RFR: JDK-8322366: Add IEEE rounding mode corruption check to JNI checks

David Holmes dholmes at openjdk.org
Wed Jan 17 05:13:48 UTC 2024


On Tue, 16 Jan 2024 12:43:06 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

>  But copying the ReportJNIWarning code is not really nice , do you think we can reuse the coding ? 

Not really. It is C code and just a static function in a file. To reuse it we would have to expose it as an API in the global namespace. It is only two lines.

> Btw. hope it is not a stupid question, where would we get the JavaThread* from that is used in the ReportJNIWarning code ?

`JavaThread::current()` - at least I assume we always have a `JavaThread`. If not then we would need to use:

Thread* current = Thread::current();
if (current->is_Java_thread()) {
  JavaThread::cast(current)->print_jni_stack();
}

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

PR Comment: https://git.openjdk.org/jdk/pull/17391#issuecomment-1894952646


More information about the hotspot-runtime-dev mailing list