[code-reflection] RFR: Bytecode round 8

Paul Sandoz psandoz at openjdk.org
Thu Jul 18 16:21:49 UTC 2024


On Wed, 10 Jul 2024 14:11:39 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> Changes in this round:
>> - ignoring monitor instructions
>> - fixed SlotLoadOp and SlotStoreOp number of requested operands
>> - fixed SlotSSA
>> - lifting UNITIALIZED_THIS
>> - fixed MH with captured values lifting
>> - implemented CONDY and INDY lifting
>> - generating of ConcatOp (lifting specifically into ConcatOp left for the next round)
>> - re-using (caching) lifted constants
>> - fixed generation of null, boolean, byte, char and short constants
>> - improved TestSmallCorpus passed cases to 29000 (from 24000)
>
> src/java.base/share/classes/java/lang/reflect/code/bytecode/SlotSSA.java line 169:
> 
>> 167:             if (slots != null) {
>> 168:                 slots.forEach(slot -> {
>> 169:                     variableStack.computeIfAbsent(slot, _ -> new ArrayDeque<>()).push(new SlotBlockArgument(n.b(), slot));
> 
> Regular SSA variable must be declared in the dominant block, so it is always present on the variableStack.
> However SlotSSA slot is stored without any dominant declaration, so my assumption is that it may be missing on the  SlotSSA variable stack.
> This small difference caused race conditional NPEs (randomly throwing based on the dominance tree node children order).

Suggest you add a comment in the source here and with line 192 (for the var SSA code i placed in asserts because the var declaration dominates, but comments will have to do here)

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

PR Review Comment: https://git.openjdk.org/babylon/pull/175#discussion_r1683135220


More information about the babylon-dev mailing list