Skip to content

Reject native methods in isRecursiveMethodTarget()#7730

Merged
0xdaryl merged 1 commit intoeclipse-omr:masterfrom
jdmpapin:isRecursiveMethodTarget-native
Apr 17, 2025
Merged

Reject native methods in isRecursiveMethodTarget()#7730
0xdaryl merged 1 commit intoeclipse-omr:masterfrom
jdmpapin:isRecursiveMethodTarget-native

Conversation

@jdmpapin
Copy link
Copy Markdown
Contributor

A native linkage adapter must not be considered to be making a recursive call, or else the code generator could encode the call instruction as a recursive call to the JIT body instead of the intended call to the native implementation.

So far we've been avoiding that situation by having isSameMethod() return false for native methods, which is confusing. By rejecting native methods explicitly here, it will now be possible to correct this problem in isSameMethod().

A native linkage adapter must not be considered to be making a recursive
call, or else the code generator could encode the call instruction as a
recursive call to the JIT body instead of the intended call to the
native implementation.

So far we've been avoiding that situation by having isSameMethod()
return false for native methods, which is confusing. By rejecting native
methods explicitly here, it will now be possible to correct this problem
in isSameMethod().
@jdmpapin
Copy link
Copy Markdown
Contributor Author

@0xdaryl, could you please review?

@jdmpapin jdmpapin removed the request for review from mstoodle April 15, 2025 17:55
@0xdaryl
Copy link
Copy Markdown
Contributor

0xdaryl commented Apr 17, 2025

Jenkins build all

@0xdaryl 0xdaryl self-assigned this Apr 17, 2025
@0xdaryl 0xdaryl merged commit 1f61079 into eclipse-omr:master Apr 17, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants