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

Thomas Stuefe stuefe at openjdk.org
Thu Dec 12 18:51:42 UTC 2024


On Thu, 12 Dec 2024 13:06:24 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> @tstuefe I have created a branch with my proposed fix, with a more robust vma_touches_thread_stack() using the new Thread::stack_base_or_null()  method.  It's at [this branch](https://github.com/stooke/jdk/tree/pr_windows_system_dump_fixes2)  I will merge it back here if you approve of the changes.
>> 
>> Should I un-problemlist the tests in this PR, or should that be a separate PR?
>
> @stooke Yes, I like that better, safe I don't believe we need `Thread::stack_base_or_null` for just one use case. I would do the t->stack_base != NULL test in vma_touches_thread_stack before the range compare (I also keep thinking we should have a generic Range class for this and eventually convert the zillion (start, end) in hotspot ... into uses of that Range class, and such a class would almost certainly barf at negative ranges (start > end)

> @tstuefe we can't call stack_base() because it will throw an assert if it's null. (hence the stack_base_or_null() addition). Would you like me to check stack_size() instead? (my suggestion is to rename stack_base_or_null() to a more generic "has_valid_stack()")

Oh you are right, I forgot that. No, I think stack_base_or_null is fine in that case.

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

PR Comment: https://git.openjdk.org/jdk/pull/21091#issuecomment-2539770597


More information about the hotspot-runtime-dev mailing list