[foreign] RFR: 8227125: java/foreign/pthread/Threads.java asserts on debug build
Nick Gasson
nick.gasson at arm.com
Wed Jul 3 06:33:36 UTC 2019
Hi,
The fix for 8226250 checks the result of JavaThread::current() for NULL
to see if this thread is attached to the VM or not. But this function
will assert on a debug build rather than return NULL. This patch uses
Thread::current_or_null() instead which allows a NULL result.
Made this change in both the universal upcall handler and the direct
fast-path. The universal handler also has an issue where
JavaCallArguments will do an allocation if the number of arguments is
greater than 8. But when the thread has just attached to the VM there is
no ResourceMark on the stack to associate the allocation with. I changed
the test to run a second time without the fast-path to catch this.
Bug: https://bugs.openjdk.java.net/browse/JDK-8227125
Webrev: http://cr.openjdk.java.net/~ngasson/foreign/8227125/webrev.0/
Thanks,
Nick
More information about the panama-dev
mailing list