[11] RFR(S): 8209637: [s390x] Interpreter doesn't call result handler after native calls
Volker Simonis
volker.simonis at gmail.com
Fri Aug 17 14:03:31 UTC 2018
Hi,
can I please have a review for this small, s390x only bug fix which
I'd like to bring to jdk11:
http://cr.openjdk.java.net/~simonis/webrevs/2018/8209637/
https://bugs.openjdk.java.net/browse/JDK-8209637
The problem is that the template interpreter for s390x doesn't call
the result handler in the native entry. This can lead to wrong results
being passed as return values from native calls which return a
jboolean if the value is not exactly '1' or '0' (i.e. a return value
of '2' will be interpreted as 'false'). The result handler usually
normalizes such results and maps any value > 0 to 'true'.
I'd like to bring this to jdk11 because the bug can lead to incorrect
results for calls to JNI functions with jboolean results. This can
affect not only user coding but also core library functions like
java.io.Console.echo() (which is called from Console.readPassword()).
The malfunction of these methods triggered the discovery of this bug.
The fix is low risk and only affects the s390x port (except the
regression test - but that shouldn't be harmful either).
Thank you and best regards,
Volker
More information about the hotspot-dev
mailing list