[code-reflection] RFR: Bytecode round 8

Adam Sotona asotona at openjdk.org
Thu Jul 18 10:52:03 UTC 2024


On Tue, 9 Jul 2024 14:15:19 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).

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

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


More information about the babylon-dev mailing list