mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 17:44:40 +02:00
8159461: bigapps/Kitchensink/stressExitCode hits assert: Must be VMThread or JavaThread
Reviewed-by: fparain, simonis, dcubed
This commit is contained in:
parent
19d25373bf
commit
74e840d64c
4 changed files with 54 additions and 10 deletions
|
@ -374,11 +374,14 @@ Thread::~Thread() {
|
|||
delete handle_area();
|
||||
delete metadata_handles();
|
||||
|
||||
// SR_handler uses this as a termination indicator -
|
||||
// needs to happen before os::free_thread()
|
||||
delete _SR_lock;
|
||||
_SR_lock = NULL;
|
||||
|
||||
// osthread() can be NULL, if creation of thread failed.
|
||||
if (osthread() != NULL) os::free_thread(osthread());
|
||||
|
||||
delete _SR_lock;
|
||||
|
||||
// clear Thread::current if thread is deleting itself.
|
||||
// Needed to ensure JNI correctly detects non-attached threads.
|
||||
if (this == Thread::current()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue