This is the mail archive of the mauve-discuss@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

StackOverflowError


  May this list be the wrong place to discuss it, but:

  The following code is not a Mauve compatibility test, but it does work different between Sun Microsystems' Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode) and gij (GNU libgcj) version 4.2.1 (Debian 4.2.1-5).

pedro@pentiumd:~/programming/java/recursive$ java Recursive 
Successfully recursed 16286.
pedro@pentiumd:~/programming/java/recursive$ gij Recursive
Segmentation fault

public class Recursive {

static int nTimes=0;

public static void main (String [] args) {

Thread t = new Thread (new Runnable () {

public void run () {

recurse();

} // run ()

private void recurse () {

Recursive.nTimes++;

try {recurse();} catch (StackOverflowError soe) {}

} // recurse ()

} // Runnable

); // new Thread

t.start();
try {t.join();} catch (InterruptedException ie) {}

System.out.println ("Successfully recursed "+nTimes+".");

} // main (String [])

} // Recursive





      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]