[aarch64-port-dev ] RFR(xs): Aarch64: ReservedStackAccess may leave stack guard in inconsistent state

David Holmes david.holmes at oracle.com
Wed Dec 19 21:28:16 UTC 2018


Shared changes in thread.cpp seem okay.

One typo:

+   assert(_stack_guard_state != stack_guard_yellow_reserved_disabled, 
"loosing information");

loosing -> losing

Thanks,
David

On 20/12/2018 3:59 am, Andrew Haley wrote:
> On 12/19/18 2:08 PM, Andrey Petushkov wrote:
>> Hi All,
>>
>> Please review small fix for for the following problem: during execution of
>> ReservedStackAccess annotated method it might happen that reserved pages
>> are reguarded while yellow pages left unguarded. At the same time the state
>> of stack guard is recorded as fully protected (stack_guard_enabled).
>> Subsequent execution of ReservedStackAccess annotated method then may lead
>> to VM crash instead of mere StackOverflowError.
>> Reproduced with ReservedStackTestCompiler jtreg test on aarch32-jdk11 port
>> codebase. The bug seem to be apparent and exists in aarch64-port as well,
>> hence the review request.
>> The actual fix is in aarch64-specific code but the shared code is changed
>> as well to help to catch such bugs earlier in the future
>>
>> the link http://cr.openjdk.java.net/~apetushkov/ReservedStackAccess/
> 
> Looks good. I note that this makes the AArch64 logic the same as x86. I've
> diffed the relevant section and we're good now.
> 
> What seems to have happened is that the change to os_linux_x86 in the
> commit for 8046936: JEP 270: Reserved Stack Areas for Critical Sections
> was not completely ported to AArch64.
> 
> Thanks.
> 


More information about the aarch64-port-dev mailing list