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:43 UTC 2024


On Mon, 25 Nov 2024 15:27:22 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.

It's unfrotunate the bug wasn't caught during review.

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.

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

Marked as reviewed by vlivanov (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22365#pullrequestreview-2459822149
PR Review Comment: https://git.openjdk.org/jdk/pull/22365#discussion_r1857464139


More information about the hotspot-dev mailing list