Comment 2 for bug 1699751

Revision history for this message
Seth Forshee (sforshee) wrote :

The test was failing because the implementation details of the stack guard area in the kernel changed. Previously there was a single guard page within the vma for the stack, now the kernel treats a range of addresses just below the vma as the guard region.

The test was placing a fixed mmap region directly below the stack vma. In the new implementation that means this mmap was over the topmost portion of the guard region, and there is no guard region between the stack and this mapping. So when the test blew the stack it would start modifying the contents of that page, which the test would detect and treat as a failure.

A simple fix has been comitted to the test, which leaves a gap of one page between the stack and the mapping. For the old implementation, the stack will be extended by one page when it hits the original guard region and then receive SIGSEGV once it hits the new guard page. With the new implementation the test receives SIGSEGV as soon as it hits the page directly below the stack. (Note that for this test, receiving SIGSEGV before modifying the contents of the memory mapping is the expected result.)