8340401: DcmdMBeanPermissionsTest.java and SystemDumpMapTest.java fail with assert(_stack_base != nullptr) failed: Sanity check

Reviewed-by: dholmes, stuefe, kevinw
This commit is contained in:
Simon Tooke 2024-12-19 02:12:02 +00:00
parent 6b89954c65
commit b0c40aadd2
4 changed files with 4 additions and 5 deletions

View File

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

View File

@ -525,6 +525,8 @@ protected:
public:
// Stack overflow support
address stack_base() const DEBUG_ONLY(;) NOT_DEBUG({ return _stack_base; })
// Needed for code that can query a new thread before the stack has been set.
address stack_base_or_null() const { return _stack_base; }
void set_stack_base(address base) { _stack_base = base; }
size_t stack_size() const { return _stack_size; }
void set_stack_size(size_t size) { _stack_size = size; }

View File

@ -135,8 +135,6 @@ serviceability/jvmti/vthread/GetThreadStateMountedTest/GetThreadStateMountedTest
serviceability/jvmti/vthread/GetSetLocalTest/GetSetLocalTest.java 8286836 generic-all
serviceability/jvmti/vthread/CarrierThreadEventNotification/CarrierThreadEventNotification.java 8333681 generic-all
serviceability/dcmd/gc/RunFinalizationTest.java 8227120 generic-all
serviceability/dcmd/vm/SystemDumpMapTest.java 8340401 windows-all
serviceability/dcmd/vm/SystemMapTest.java 8340401 windows-all
serviceability/sa/ClhsdbCDSCore.java 8267433,8318754 macosx-x64,macosx-aarch64
serviceability/sa/ClhsdbFindPC.java#xcomp-core 8267433,8318754 macosx-x64,macosx-aarch64

View File

@ -540,8 +540,6 @@ java/io/IO/IO.java 8337935 linux-pp
com/sun/management/OperatingSystemMXBean/GetProcessCpuLoad.java 8030957 aix-all
com/sun/management/OperatingSystemMXBean/GetSystemCpuLoad.java 8030957 aix-all
com/sun/management/DiagnosticCommandMBean/DcmdMBeanPermissionsTest.java 8340401 windows-all
java/lang/management/MemoryMXBean/Pending.java 8158837 generic-all
java/lang/management/MemoryMXBean/PendingAllGC.sh 8158837 generic-all