JDK-8031115 : intrinsics for Math.decrementExact(J) and incrementExact(J) don't work
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs25,8,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-12-31
  • Updated: 2014-07-29
  • Resolved: 2014-01-15
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 8 JDK 9
8u20 b01Fixed 9Fixed
Description
Issue was found by Anton Ivanov:
"DecrementExactLongTest.java and IncrementExactLongTest.java fails on amd64 platform. I suppose a product bug (no intrinsic are used where it should be)"
these tests were integrated in JDK-8028587

the root cause is wrong signaturies in src/share/vm/classfile/vmSymbols.hpp, both methods use long2_long_signature, but it has to be long_long_signature.

do_intrinsic(_decrementExactL,          java_lang_Math,         decrementExact_name, long2_long_signature,     F_S) 
...
do_intrinsic(_incrementExactL,          java_lang_Math,         incrementExact_name, long2_long_signature,     F_S)




Comments
excerpt from jtr-file: #section:main ----------messages:(3/139)---------- command: main Verifier hs_neg.log hs.log reason: User specified action: run main Verifier hs_neg.log hs.log elapsed time (seconds): 6.823 ----------System.out:(4/196)---------- Verifying hs_neg.log Intrinsic _incrementExactL verification, expected: 0, matched: 0, suspected: 0 Verifying hs.log Intrinsic _incrementExactL verification, expected: 1, matched: 0, suspected: 0 ----------System.err:(14/985)---------- java.lang.RuntimeException: Unexpected count of intrinsic <intrinsic id='_incrementExactL' expected:1, matched: 0, suspected: 0 at Verifier.verify(Verifier.java:69) at Verifier.main(Verifier.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94) at java.lang.Thread.run(Thread.java:744) JavaTest Message: Test threw exception: java.lang.RuntimeException: Unexpected count of intrinsic <intrinsic id='_incrementExactL' expected:1, matched: 0, suspected: 0 JavaTest Message: shutting down test
04-01-2014