RFR: JDK-8325264: two compiler/intrinsics/float16 tests fail after JDK-8324724

Bhavana Kilambi bkilambi at openjdk.org
Thu Feb 8 11:07:53 UTC 2024


On Thu, 8 Feb 2024 10:31:48 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:

>> Fix for two JTREG test failures on OS_X after this commit - https://github.com/openjdk/jdk/commit/51853f7488afa69c0d14b0e96f1da84822cd83f1.
>> 
>> This is due to no permission to execute the stub code in the code cache. This patch fixes this problem by acquiring "WXExec" to be able to execute the instructions in code cache.
>> 
>> Both the tests - compiler/intrinsics/float16/TestAllFloat16ToFloat.java and compiler/intrinsics/float16/Binary16ConversionNaN.java pass on a MacOS machine.
>
> src/hotspot/share/runtime/stubRoutines.hpp line 457:
> 
>> 455:   static jshort f2hf(jfloat x) {
>> 456:     MACOS_AARCH64_ONLY(ThreadWXEnable wx(WXExec, Thread::current());) // About to call into code cache
>> 457:     assert(_f2hf != nullptr, "stub is not implemented on this platform");
> 
> Would it make sense to have the assert as first thing in the method?

Yes, probably a better idea to make sure the address (of the stub) being accessed is valid before making that memory region executable. Will make changes and update. Thanks!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17733#discussion_r1482791010


More information about the hotspot-dev mailing list