-
Notifications
You must be signed in to change notification settings - Fork 232
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
8329013: StackOverflowError when starting Apache Tomcat with signed jar #2687
Conversation
👋 Welcome back ashi! A progress list of the required criteria for merging this PR into |
@amosshi This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 39 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
This backport pull request has now been updated with issue from the original commit. |
Webrevs
|
Thread thread() { | ||
return this.thread; | ||
} | ||
|
||
@Override |
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.
Java 11 doe not have record
yet (Java 14 via JEP 359), so we convert this record
type as inner class
.
@Override | ||
public int hashCode() { | ||
return Long.hashCode(thread.threadId()); | ||
return Long.hashCode(thread.getId()); | ||
} |
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.
threadId()
method does not exit in Java 11 yet
- It was introduced by openjdk/jdk@9583e36 - JDK-8284161
we are using getId()
method on jdk11u-dev
which is doing exactly the same job.
@Deprecated(since="19")
public long getId() {
return threadId();
}
public final long threadId() {
return tid;
}
return (obj instanceof ThreadRef other) | ||
&& this.thread == other.thread; | ||
return (obj instanceof ThreadRef) | ||
&& this.thread == ((ThreadRef)obj).thread; | ||
} |
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.
instanceof operator
was introduced by Java 14
via JEP 305
, on jdk11u-dev
we need convert this code to traditional manner
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.
looks okay but please check for final in the record to class conversion.
* The hashCode/equals methods do not invoke the Thread hashCode/equals method | ||
* as they may run arbitrary code and/or leak references to Thread objects. | ||
*/ | ||
private class ThreadRef { |
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.
In case of record to class, shouldn't it be a final class ?
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.
@MBaesken Good catch. I decompiled a Java Record type confirmed this point: final
is needed
access_flags: 0000000000110000 final super
|
I don't have time to review this, but kudos for clearly delineating and explaining the delta between this patch and its original. Wish every backporter would do this. |
/approval request "Un-Clean backport. SAP nightlies passed on 2024-05-04” |
/integrate |
Going to push as commit 7b377ac.
Your commit was automatically rebased without conflicts. |
Backport of JDK-8329013
src/java.base/share/classes/jdk/internal/misc/ThreadTracker.java
file needed by this PRThreadTracker.java
class was added by openjdk/jdk@9583e36 , which is pretty big forVirtual Threads
(JDK-8284161) and we have no intention to back port this change to Java 11 right nowThreadTracker.java
tojdk11u-dev
src/java.base/share/classes/jdk/internal/event/EventHelper.java
based on theEventHelper.java.rej
file. The change to this file can beconsidered as clean
.ThreadTracker.java
ThreadRef
for the originalRecord
type should befinal
Testing
RecursiveEventHelper.java
: Test results: passed: 12024-04-28
jdk/security/logging/RecursiveEventHelper.java
: SUCCESSFUL GitHub 📊⏲ - [2,152 msec]2024-05-04
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/2687/head:pull/2687
$ git checkout pull/2687
Update a local copy of the PR:
$ git checkout pull/2687
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/2687/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2687
View PR using the GUI difftool:
$ git pr show -t 2687
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/2687.diff
Webrev
Link to Webrev Comment