JDK-8209637 : [s390x] Interpreter doesn't call result handler after native calls
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9,10,11
  • Priority: P1
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: s390x
  • Submitted: 2018-08-17
  • Updated: 2018-11-14
  • Resolved: 2018-08-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12
11 b28Fixed 12Fixed
Related Reports
Relates :  
Relates :  
Description
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 jboolean values if these values are not exactly '1' or '0' (i.e. a return value of '2' will be interpreted as 'false').

The result handler normalizes such results and maps any value > 0 to 'true'.
Comments
Fix request approved. I ran new tests on our platforms with fastdebug build. I also stress tested them by running with -Xcomp -XX:-TieredCompilation -XX:+DeoptimizeALot flags. All passed. The fix itself is s390 specific.
20-08-2018

http://cr.openjdk.java.net/~simonis/webrevs/2018/8209637.v1/
20-08-2018

Fix Request 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 very small and isolated. It only affects the s390x port (except the regression test - but that shouldn't be harmful either). webrev: http://cr.openjdk.java.net/~simonis/webrevs/2018/8209637/ review thread: http://mail.openjdk.java.net/pipermail/hotspot-dev/2018-August/033823.html Thank you and best regards, Volker
17-08-2018

Moved to hotspot/runtime. Please don't file hotspot bugs without a subcomponent.
17-08-2018