DCHECK(stack_size % page_size == 0);
This doesn't seem reasonable. Can you instead set stack_alloc_size to 2 pages plus stack_size rounded up to a full page if necessary?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
DCHECK(stack_size % page_size == 0);
This doesn't seem reasonable. Can you instead set stack_alloc_size to 2 pages plus stack_size rounded up to a full page if necessary?
If the stack size is not a multiple of the page size, then crashpad will still find more stack than is expected unless we also round up the expected stack size.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Code-Review | +1 |
DCHECK(stack_size % page_size == 0);
Joshua PerazaThis doesn't seem reasonable. Can you instead set stack_alloc_size to 2 pages plus stack_size rounded up to a full page if necessary?
If the stack size is not a multiple of the page size, then crashpad will still find more stack than is expected unless we also round up the expected stack size.
If the stack size is not a multiple of the page size, then crashpad will still find more stack than is expected unless we also round up the expected stack size.
Good point, for the purpose of the test I guess this is fine.
I’d suggest `DCHECK_EQ(stack_size % page_size, 0u);` then.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Commit-Queue | +1 |
Joshua PerazaThis doesn't seem reasonable. Can you instead set stack_alloc_size to 2 pages plus stack_size rounded up to a full page if necessary?
Mark MentovaiIf the stack size is not a multiple of the page size, then crashpad will still find more stack than is expected unless we also round up the expected stack size.
If the stack size is not a multiple of the page size, then crashpad will still find more stack than is expected unless we also round up the expected stack size.
Good point, for the purpose of the test I guess this is fine.
I’d suggest `DCHECK_EQ(stack_size % page_size, 0u);` then.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
1 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: snapshot/linux/process_reader_linux_test.cc
Insertions: 1, Deletions: 1.
@@ -182,7 +182,7 @@
if (stack_size > 0) {
const size_t page_size = getpagesize();
- DCHECK(stack_size % page_size == 0);
+ DCHECK_EQ(stack_size % page_size, 0u);
size_t stack_alloc_size = 2 * page_size + stack_size;
ASSERT_TRUE(thread->stack.ResetMmap(nullptr,
```
Add guard pages to test stacks
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |