Commit 0854f189 by Andrew Haley

re PR java/27908 (VMSecureRandom generateSeed infinite loop? (Regression))

2007-09-04  Andrew Haley  <aph@redhat.com>

	PR java/27908
	* testsuite/libjava.lang/PR27908.java
	({run1,run2,run3}.isRunning): New Method.
	(main): Fix race condition.

From-SVN: r128094
parent cb642590
......@@ -13,7 +13,8 @@ class PR27908
(t2 = new Thread (r2)).start();
(t3 = new Thread (r3)).start();
Thread.yield();
while (! (r1.isRunning() && r2.isRunning() && r3.isRunning()))
Thread.yield();
r1.stop();
r2.stop();
......@@ -45,6 +46,11 @@ class PR27908
{
running = false;
}
public boolean isRunning()
{
return running;
}
}
private static class run2 implements Runnable
......@@ -64,6 +70,11 @@ class PR27908
{
running = false;
}
public boolean isRunning()
{
return running;
}
}
static class run3 implements Runnable
......@@ -83,5 +94,10 @@ class PR27908
{
running = false;
}
public boolean isRunning()
{
return running;
}
}
}
class Foo
{
Class bar()
{
return gnu.classpath.VMStackWalker.getCallingClass();
}
}
public class WalkerTest
{
public static void main(String[] argv)
{
System.out.println(new Foo().bar());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment