File tree 2 files changed +11
-1
lines changed
src/hotspot/share/runtime
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,16 @@ Thread::Thread(MemTag mem_tag) {
145
145
MACOS_AARCH64_ONLY (DEBUG_ONLY (_wx_init = false ));
146
146
}
147
147
148
+ #ifdef ASSERT
149
+ address Thread::stack_base () const {
150
+ // Note: can't report Thread::name() here as that can require a ResourceMark which we
151
+ // can't use because this gets called too early in the thread initialization.
152
+ assert (_stack_base != nullptr , " Stack base not yet set for thread id:%d (0 if not set)" ,
153
+ osthread () != nullptr ? osthread ()->thread_id () : 0 );
154
+ return _stack_base;
155
+ }
156
+ #endif
157
+
148
158
void Thread::initialize_tlab () {
149
159
if (UseTLAB) {
150
160
tlab ().initialize ();
Original file line number Diff line number Diff line change @@ -532,7 +532,7 @@ class Thread: public ThreadShadow {
532
532
533
533
public:
534
534
// Stack overflow support
535
- address stack_base () const { assert (_stack_base != nullptr , " Sanity check " ); return _stack_base; }
535
+ address stack_base () const DEBUG_ONLY(;) NOT_DEBUG({ return _stack_base; })
536
536
void set_stack_base(address base) { _stack_base = base; }
537
537
size_t stack_size () const { return _stack_size; }
538
538
void set_stack_size (size_t size) { _stack_size = size; }
You can’t perform that action at this time.
0 commit comments