RFR: 8275286: Check current thread when calling JRT methods that expect it

Aleksey Shipilev shade at openjdk.java.net
Thu Oct 14 14:00:58 UTC 2021

I found this oddity when porting Loom to x86_32. There are JRT entries that have `JavaThread* current` in their signature, and I believe that sets the expectation that JRT entry is to be called with the current thread as the argument. But, that is not mechanically checked, unless we call into some other class like `ThreadInVMfromJava`, etc. To simplify debugging, we should check current thread explicitly.

Additional testing:
 - [x] Linux x86_64 fastdebug `tier1`
 - [ ] Linux x86_64 fastdebug `tier2`


Commit messages:
 - Fix

Changes: https://git.openjdk.java.net/jdk/pull/5949/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5949&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8275286
  Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5949.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5949/head:pull/5949

PR: https://git.openjdk.java.net/jdk/pull/5949

More information about the hotspot-runtime-dev mailing list