RFR: 8344355: Register corruption in MacroAssembler::lookup_secondary_supers_table_var: x86-64 only

Vladimir Ivanov vlivanov at openjdk.org
Mon Nov 25 23:32:44 UTC 2024


On Mon, 25 Nov 2024 23:20:37 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

>> This bug only affects x86-64 machines without a `popcnt` instruction, which basically means pre-SSE4.2 machines. This means that x86-64 processors made around 2010 are affected.
>> 
>> My thanks to everyone who was was involved in bisecting this, particularly Martin Bucholz who seems to be the only one testing on such old hardware.
>
> src/hotspot/cpu/x86/macroAssembler_x86.cpp line 4915:
> 
>> 4913:     bind(done);
>> 4914:   }
>> 4915: #ifdef ASSERT
> 
> I understand that it greatly increases the reproducibility of the bug, but does such an adhoc code snippet adds much from maintenance perspective? Reusing registers is common in assembly code, so if all places where a register value is destroyed are annotated in a similar way, it would add a lot of noise on source code level.

I'm looking at `MacroAssembler::lookup_secondary_supers_table_var()` and the only thing which can be improved there is an extra comment around line 5116 stressing that `population_count` destroys `slot`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22365#discussion_r1857469749


More information about the hotspot-dev mailing list