One failing test

Andrew Haley aph at redhat.com
Fri Apr 17 09:11:53 UTC 2015


Exception in thread "main" java.lang.NoSuchMethodError: sun.misc.Unsafe.fieldOffset(Ljava/lang/reflect/Field;)I
	at org.openjdk.jcstress.tests.interrupt.UnsafeBusyLoopTest.<clinit>(UnsafeBusyLoopTest.java:47)
	at org.openjdk.jcstress.tests.interrupt.generated.UnsafeBusyLoopTest_jcstress.run(UnsafeBusyLoopTest_jcstress.java:73)
	at org.openjdk.jcstress.tests.interrupt.generated.UnsafeBusyLoopTest_jcstress.run(UnsafeBusyLoopTest_jcstress.java:45)
	at org.openjdk.jcstress.JCStress.async(JCStress.java:195)
	at org.openjdk.jcstress.JCStress.run(JCStress.java:221)
	at org.openjdk.jcstress.JCStress.run(JCStress.java:190)
	at org.openjdk.jcstress.ForkedMain.main(ForkedMain.java:50)

Needs this:

diff -r 5fcd4f948639 tests-custom/src/main/java/org/openjdk/jcstress/tests/interrupt/UnsafeBusyLoopTest.java
--- a/tests-custom/src/main/java/org/openjdk/jcstress/tests/interrupt/UnsafeBusyLoopTest.java	Tue Mar 10 14:39:51 2015 +0300
+++ b/tests-custom/src/main/java/org/openjdk/jcstress/tests/interrupt/UnsafeBusyLoopTest.java	Fri Apr 17 10:10:42 2015 +0100
@@ -44,7 +44,7 @@

     static {
         try {
-            offset = UnsafeHolder.U.fieldOffset(UnsafeBusyLoopTest.class.getDeclaredField("isStopped"));
+            offset = UnsafeHolder.U.objectFieldOffset(UnsafeBusyLoopTest.class.getDeclaredField("isStopped"));
         } catch (NoSuchFieldException e) {
             throw new IllegalStateException(e);
         }

Andrew.


More information about the jcstress-dev mailing list