JDK-8152179 : C2: Folding of unsigned loads is broken w/ @Stable
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-03-18
  • Updated: 2017-08-24
  • Resolved: 2016-03-28
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 9
9 b114Fixed
Related Reports
Relates :  
Relates :  
Description
At least one of the Lucene tests is failing in 9b110, and the latest hs-comp:

   [junit4] Suite: org.apache.lucene.analysis.fr.TestFrenchLightStemFilter
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestFrenchLightStemFilter -Dtests.method=testVocabulary -Dtests.seed=4044297F9BFA5E32 -Dtests.slow=true -Dtests.locale=az-Cyrl-AZ -Dtests.timezone=ACT -Dtests.asserts=true -Dtests.file.encoding=UTF-8
   [junit4] FAILURE 1.99s | TestFrenchLightStemFilter.testVocabulary <<<
   [junit4]    > Throwable #1: org.junit.ComparisonFailure: term 0 expected:<particuli[]> but was:<particuli[er]>
   [junit4]    > 	at __randomizedtesting.SeedInfo.seed([4044297F9BFA5E32:B159DDC343FD4788]:0)
   [junit4]    > 	at org.apache.lucene.analysis.BaseTokenStreamTestCase.assertTokenStreamContents(BaseTokenStreamTestCase.java:185)
 ...
   [junit4]   2> NOTE: test params are: codec=Asserting(Lucene60): {}, docValues:{}, maxPointsInLeafNode=1153, maxMBSortInHeap=4.174778186834161, sim=ClassicSimilarity, locale=az-Cyrl-AZ, timezone=ACT

See the "NOTE" line for the one-liner reproducer.

Fastdebug build does not assert. The test starts to pass with -Dargs="-XX:TieredStopAtLevel=1" or -Dargs="-XX:+UnlockDiagnosticVMOptions -XX:-FoldStableValues", which points to @Stable bug in C2. Dropping @Stable from String.value also makes test pass. This seems to be another thing triggered by @Stable String.value (JDK-8150180) -- we fixed a lot of them, but this one seemed to escape.
Comments
Original report: https://issues.apache.org/jira/browse/LUCENE-7114
18-03-2016