RFR: 8340491: Thread stack-base assertion should report which thread has the un-set stack

David Holmes dholmes at openjdk.org
Fri Sep 20 06:20:35 UTC 2024


On Fri, 20 Sep 2024 06:06:51 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Please review this simple enhancement to an assertion so we can identify which thread had the problem.
>> 
>> I had to move the function to the cpp file due to include file issues.
>> 
>> We are limited in what we can print due to this being used very early in the thread initialization process - in particular no ResourceMarks are possible so we can't print the name.
>> 
>> Testing:
>>  - tier 5 (used to debug [JDK-8340401](https://bugs.openjdk.org/browse/JDK-8340401))
>>  - tiers 1-3 sanity
>> 
>> Thanks
>
> src/hotspot/share/runtime/thread.cpp line 155:
> 
>> 153:   return _stack_base;
>> 154: }
>> 155: 
> 
> Can't we still have this as inlined version? Either move this to thread.inline.hpp or give us a release variant without assert in Thread body in thread.hpp.

I wanted to avoid updating a bunch of files to change the include header but I didn't think about just having the release variant defined in the header file ...

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21102#discussion_r1768045527


More information about the hotspot-runtime-dev mailing list