-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Backport] Delete native methods from java.lang.Thread #35
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The MethodHandles
and MethodHandleNatives
native methods deletions seem redundant but safe at the same time.
....core/src/com/oracle/svm/core/methodhandles/Target_java_lang_invoke_MethodHandleNatives.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to only have the changes to java.lang.Thread
, unless we have evidence that the other change is needed as well.
@Karm Please change the title of the PR to something clearer. Without looking up the commit id somewhere else it doesn't say what it's doing. I suggest this commit message (first line as PR title):
Thanks! |
It is in no way related as far as my study of the original commit goes. The commit involves like 4 unrelated topics and cleanups. The issue we witnessed was solely about people trying to use reflection to construct a virtual thread when a runtime offering that was detected. I will remove all other unrelated parts then... |
'getStackTrace0' is only used in asyncGetStackTrace() which is deleted as well. Thread.getStackTrace() is replaced by PlatformThreads.getStackTrace(). So it's not reachable. 'getNextThreadIdOffset()' is only used in ThreadIdentifiers private class which is substituted in JDKs better than JDK 19 (which includes 21). So won't be reachable either. Fixes: graalvm#28 This is a partial backport of: "Introudce a mode to unconditionally include classes" oracle/graal@369f0ff8 to address oracle/graal#9672 Only take the java.lang.Thread native method deletions as that's sufficient to fix the issue reported in graalvm#28.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. LGTM!
'getStackTrace0' is only used in asyncGetStackTrace() which is deleted as well.
Thread.getStackTrace() is replaced by PlatformThreads.getStackTrace(). So it's not
reachable.
'getNextThreadIdOffset()' is only used in ThreadIdentifiers private class which is
substituted in JDKs better than JDK 19 (which includes 21). So won't be reachable either.
Fixes: #28
This is a partial backport of:
"Introudce a mode to unconditionally include classes" oracle/graal@369f0ff8
to address oracle/graal#9672
Only take the java.lang.Thread native method deletions as that's sufficient to fix
the issue reported in #28.