Skip to content

Commit b0c40aa

Browse files
author
Simon Tooke
committed
8340401: DcmdMBeanPermissionsTest.java and SystemDumpMapTest.java fail with assert(_stack_base != nullptr) failed: Sanity check
Reviewed-by: dholmes, stuefe, kevinw
1 parent 6b89954 commit b0c40aa

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/hotspot/share/nmt/memMapPrinter.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ static bool vma_touches_thread_stack(const void* from, const void* to, const Thr
172172
// Very rarely however is a VMA backing a thread stack folded together with another adjacent VMA by the
173173
// kernel. That can happen, e.g., for non-java threads that don't have guard pages.
174174
// Therefore we go for the simplest way here and check for intersection between VMA and thread stack.
175-
return range_intersects(from, to, (const void*)t->stack_end(), (const void*)t->stack_base());
175+
// Note it is possible to encounter a brand new thread that has not yet initialized its stack fields.
176+
return range_intersects(from, to, (const void*)t->stack_end(), (const void*)t->stack_base_or_null());
176177
}
177178

178179
struct GCThreadClosure : public ThreadClosure {

src/hotspot/share/runtime/thread.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,8 @@ class Thread: public ThreadShadow {
525525
public:
526526
// Stack overflow support
527527
address stack_base() const DEBUG_ONLY(;) NOT_DEBUG({ return _stack_base; })
528+
// Needed for code that can query a new thread before the stack has been set.
529+
address stack_base_or_null() const { return _stack_base; }
528530
void set_stack_base(address base) { _stack_base = base; }
529531
size_t stack_size() const { return _stack_size; }
530532
void set_stack_size(size_t size) { _stack_size = size; }

test/hotspot/jtreg/ProblemList.txt

-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,6 @@ serviceability/jvmti/vthread/GetThreadStateMountedTest/GetThreadStateMountedTest
135135
serviceability/jvmti/vthread/GetSetLocalTest/GetSetLocalTest.java 8286836 generic-all
136136
serviceability/jvmti/vthread/CarrierThreadEventNotification/CarrierThreadEventNotification.java 8333681 generic-all
137137
serviceability/dcmd/gc/RunFinalizationTest.java 8227120 generic-all
138-
serviceability/dcmd/vm/SystemDumpMapTest.java 8340401 windows-all
139-
serviceability/dcmd/vm/SystemMapTest.java 8340401 windows-all
140138

141139
serviceability/sa/ClhsdbCDSCore.java 8267433,8318754 macosx-x64,macosx-aarch64
142140
serviceability/sa/ClhsdbFindPC.java#xcomp-core 8267433,8318754 macosx-x64,macosx-aarch64

test/jdk/ProblemList.txt

-2
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,6 @@ java/io/IO/IO.java 8337935 linux-pp
540540

541541
com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java 8030957 aix-all
542542
com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java 8030957 aix-all
543-
com/sun/management/DiagnosticCommandMBean/DcmdMBeanPermissionsTest.java 8340401 windows-all
544-
545543

546544
java/lang/management/MemoryMXBean/Pending.java 8158837 generic-all
547545
java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic-all

0 commit comments

Comments
 (0)