Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// red_zone_start ^ ^ red_zone_end
Nit: I think the "red zone" should go to both (or either of) data_cage_ro_start/data_cage_ro_end. And those variables don't exist anymore, so probably should be renamed as well.
current += (size_t{4} * kPtrComprCageBaseAlignment)) {
Isn't this 16GB? kPtrComprCageBaseAlignment is already 1<<32, so 4GB?
CHECK_EQ(red_zone_size, region()
Shouldn't this be CHECK_LE here? Let's say our code cage starts add 4GB+2MB - then our red zone size should only be 6MB instead of the full 8MB.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
}
Nit: Maybe as a sanity check, we could check here after the loop that `CHECK_LE(number_of_red_zones, 1)`.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +1 |
Nit: I think the "red zone" should go to both (or either of) data_cage_ro_start/data_cage_ro_end. And those variables don't exist anymore, so probably should be renamed as well.
Good point. I simplified this picture and removed the variable names. This allowed for adding more cases.
current += (size_t{4} * kPtrComprCageBaseAlignment)) {
Isn't this 16GB? kPtrComprCageBaseAlignment is already 1<<32, so 4GB?
Done
Shouldn't this be CHECK_LE here? Let's say our code cage starts add 4GB+2MB - then our red zone size should only be 6MB instead of the full 8MB.
`red_zone_size` is 6MB in this case. It's computed from the adjusted start/end.
That said, I changed the check now to actually use AddressRegion::GetOverlap() which could actually be used instead if we see the crash going away.
Nit: Maybe as a sanity check, we could check here after the loop that `CHECK_LE(number_of_red_zones, 1)`.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
CHECK_EQ(number_of_red_zones, 1);
Shouldn't this be <= 1? We don't necessarily have a red zone, right?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Shouldn't this be <= 1? We don't necessarily have a red zone, right?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
3 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/heap/code-range.cc
Insertions: 1, Deletions: 1.
@@ -289,7 +289,7 @@
PageAllocator::kNoAccess));
}
}
- CHECK_EQ(number_of_red_zones, 1);
+ CHECK_LE(number_of_red_zones, 1);
#endif // CONTIGUOUS_COMPRESSED_READ_ONLY_SPACE_BOOL
// Don't pre-commit the code cage on Windows since it uses memory and it's not
```
[heap] Fix CodeRange red zone allocation for contiguous RO space
The computation only computed the first candidate region that would
overlap but there's also a candidate within the code range itself.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |