RFR: 8364235: Fix for JDK-8361447 breaks the alignment requirements for GuardedMemory [v2]

David Holmes dholmes at openjdk.org
Wed Jul 30 06:47:57 UTC 2025


On Tue, 29 Jul 2025 08:24:02 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

>> It ensures that the offset of the user-data ptr within the `GuardedMemory` object, places the user-data on a suitably aligned boundary.
>> 
>> I tried:
>> 
>>   alignas(16) u_char* _base_addr;
>> 
>> but that did not work. Perhaps I am using it wrong?
>
> That would simply align the "guarded memory handle"'s field (on the stack) not the value inside. It is the value we put in there that needs to be aligned.

Yep I got confused about which ptr was the "user data".

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26524#discussion_r2241689839


More information about the hotspot-runtime-dev mailing list