RFR: 8344355: Register corruption in MacroAssembler::lookup_secondary_supers_table_var: x86-64 only [v2]
Andrew Haley
aph at openjdk.org
Tue Nov 26 11:06:39 UTC 2024
On Tue, 26 Nov 2024 11:00:18 GMT, Andrew Haley <aph 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.
>
> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>
> 8344355: Register corruption in MacroAssembler::lookup_secondary_supers_table_var: x86-64 only
> It's unfortunate the bug wasn't caught during review.
Well, yes, but nothing is perfect and this bug was pretty obscure. I even annotated the call to `population_count()` to show that `slot` was passed as a temp, but missed the significance of that. Testing can never show the absence of bugs, but I'd advocate for clobbering registers only used on rare code paths to be a standard practice.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22365#issuecomment-2500315408
More information about the hotspot-dev
mailing list