This is the mail archive of the java-prs@sourceware.cygnus.com mailing list for the Java project.


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

Re: gcj/232: segmentation violation at except.c:2180


The following reply was made to PR gcj/232; it has been noted by GNATS.

From: Fred Gray <fegray@uiuc.edu>
To: bryce@albatross.co.nz (Bryce McKinlay)
Cc: fegray@uiuc.edu, java-gnats@sourceware.cygnus.com
Subject: Re: gcj/232: segmentation violation at except.c:2180
Date: Sun, 21 May 2000 23:38:05 -0500 (CDT)

 > 
 > The problem is that gcj does not like the use of a static final String as
 > a monitor lock.
 > 
 > Workaround: make "lock" an Object, or make it non-final.
 > 
 
 I think that this is an oversimplification of the situation, because the
 following also fails, though only when compiled from bytecode:
 
 public class PR232B
 {
   private static Object lock = new Object();
   private static PR232B instance = null;
 
   public void a()
   {   
     synchronized(lock)
     {
       instance = new PR232B();
     } 
   }
 };
 
 Note that lock is now a non-final Object. 
 
 Thanks.
 
 -- Fred

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