RFR: 8369642: [ubsan] nmethod::nmethod null pointer passed as argument 2 to memcpy [v2]
    Chad Rakoczy 
    duke at openjdk.org
       
    Tue Oct 14 22:33:40 UTC 2025
    
    
  
On Tue, 14 Oct 2025 16:20:16 GMT, Vladimir Kozlov <kvn at openjdk.org> wrote:
>> Chad Rakoczy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add reference counter offset
>
> This is annoying. In all places `ImmutableDataReferencesCounterSize` is referenced  we have `align_up(ImmutableDataReferencesCounterSize, oopSize)`.
> 
> May be we should `#define ImmutableDataReferencesCounterSize  oopSize` with comment that we only use 4 bytes for now. We have getter/setter methods which cast to (int*) anyway.
@vnkozlov What do you think about this change?
I think we should just treat the reference counter the same as we treat the other immutable data fields. I think the addition of an offset int in the nmethod is worth it to make the code readable and consistent
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27778#issuecomment-3403821706
    
    
More information about the hotspot-compiler-dev
mailing list