Skip to content

Set dummy resolved method flag in findOrCreateHandleMethodSymbol() - #20231

Merged
0xdaryl merged 1 commit into
eclipse-openj9:masterfrom
jdmpapin:invokehandle-symref-sharing-race
Sep 26, 2024
Merged

Set dummy resolved method flag in findOrCreateHandleMethodSymbol()#20231
0xdaryl merged 1 commit into
eclipse-openj9:masterfrom
jdmpapin:invokehandle-symref-sharing-race

Conversation

@jdmpapin

Copy link
Copy Markdown
Contributor

...instead of in the caller.

This method is also called from stashArgumentsForOSR(), which neglected to set the flag. Because the flag wasn't set, the symbol reference was available for reuse, and it would be reused even if the invokehandle instruction became resolved before genInvokeHandle(). In that case, genInvokeHandle() would see isUnresolved=false, so it would push only the appendix (if non-null), but then it would get the dummy linkToStatic symbol reference, which expects more arguments.

This flag is now set in findOrCreateHandleMethodSymbol(). There's no reason to allow a caller to forget to set the flag.

...instead of in the caller.

This method is also called from stashArgumentsForOSR(), which neglected
to set the flag. Because the flag wasn't set, the symbol reference was
available for reuse, and it would be reused even if the invokehandle
instruction became resolved before genInvokeHandle(). In that case,
genInvokeHandle() would see isUnresolved=false, so it would push only
the appendix (if non-null), but then it would get the dummy linkToStatic
symbol reference, which expects more arguments.

This flag is now set in findOrCreateHandleMethodSymbol(). There's no
reason to allow a caller to forget to set the flag.
@jdmpapin

Copy link
Copy Markdown
Contributor Author

@0xdaryl, could you please review?

@0xdaryl 0xdaryl self-assigned this Sep 25, 2024
@0xdaryl

0xdaryl commented Sep 25, 2024

Copy link
Copy Markdown
Contributor

Jenkins test sanity all jdk21

@jdmpapin

Copy link
Copy Markdown
Contributor Author

The AArch64 Linux sanity.functional failure is #20233

@0xdaryl

0xdaryl commented Sep 26, 2024

Copy link
Copy Markdown
Contributor

Two of the four Windows timeouts appear to be OSR decompilation tests. Can you check if these are real failures?

@jdmpapin

Copy link
Copy Markdown
Contributor Author

Looks like #19678, which has also popped up in another PR recently. That issue doesn't mention decomp002-OSRFV, but that seems to just be a variant of decomp002

@jdmpapin

Copy link
Copy Markdown
Contributor Author

I should mention that this change shouldn't affect any actual OSR transitions (though the bug was only in compilations that have OSR enabled)

stashArgumentsForOSR() isn't itself sensitive to the dummy resolved flag. All it does with the symref/symbol is determine the number of parameters. So setting this flag shouldn't affect the operation of stashArgumentsForOSR() at all. It will just prevent the symref from getting inappropriately reused later

@0xdaryl
0xdaryl merged commit ec19a27 into eclipse-openj9:master Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants