mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 12:23:59 +08:00
re PR libgcj/18699 (SIGSEGV in GC_local_gcj_malloc)
2004-12-01 Bryce McKinlay <mckinlay@redhat.com> PR libgcj/18699 * testsuite/libjava.lang/PR18699.java, testsuite/libjava.lang/PR18699.out: New test. From-SVN: r91573
This commit is contained in:
parent
b923517634
commit
28a6dfca3d
@ -1,3 +1,9 @@
|
||||
2004-12-01 Bryce McKinlay <mckinlay@redhat.com>
|
||||
|
||||
PR libgcj/18699
|
||||
* testsuite/libjava.lang/PR18699.java,
|
||||
testsuite/libjava.lang/PR18699.out: New test.
|
||||
|
||||
2004-11-30 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||
|
||||
* gnu/java/awt/peer/gtk/GdkGraphics.java (drawImage variants):
|
||||
|
36
libjava/testsuite/libjava.lang/PR18699.java
Normal file
36
libjava/testsuite/libjava.lang/PR18699.java
Normal file
@ -0,0 +1,36 @@
|
||||
// Test for thread-local allocation problems.
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Observable;
|
||||
import java.util.Observer;
|
||||
|
||||
class PR18699 extends Observable implements Runnable, Observer {
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
PR18699 PR18699_1 = new PR18699();
|
||||
PR18699 PR18699_2 = new PR18699();
|
||||
PR18699_1.addObserver(PR18699_2);
|
||||
PR18699_2.addObserver(PR18699_1);
|
||||
new Thread(PR18699_1).start();
|
||||
new Thread(PR18699_2).start();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
int c = 0;
|
||||
String s = "";
|
||||
while (++c < 50) {
|
||||
this.setChanged();
|
||||
s = "";
|
||||
for (int i = 0; i < 200; i++)
|
||||
s += String.valueOf(i);
|
||||
this.notifyObservers(s);
|
||||
}
|
||||
}
|
||||
|
||||
HashMap map = new HashMap();
|
||||
|
||||
public void update(Observable o, Object obj)
|
||||
{
|
||||
map.put(o, obj);
|
||||
}
|
||||
}
|
0
libjava/testsuite/libjava.lang/PR18699.out
Normal file
0
libjava/testsuite/libjava.lang/PR18699.out
Normal file
Loading…
Reference in New Issue
Block a user