PATCH: java/25330: A race condition in write_classfile

Matthias Klose doko@cs.tu-berlin.de
Tue Dec 13 11:05:00 GMT 2005


this was fixed on the trunk, but seems to be necessary for 4.1 as
well.

H. J. Lu writes:
> On Mon, Dec 12, 2005 at 12:36:18PM -0700, Tom Tromey wrote:
> > >>>>> "David" == David Daney <ddaney@avtrex.com> writes:
> > 
> > David> Does gcj only write the classfile requested, or does it also write
> > David> classfiles of dependent classes (ala Sun's javac)?
> > 
> > It only writes the ones that are requested.
> > This is PR 6933.  FWIW  gcjx can do this.
> > 
> 
> In x86_64-unknown-linux-gnu/libjava/classpath/lib, there are
> 
> # find -name *.list | xargs grep gcc/libjava/java/net/URL.java
> ./lists/java-net.list:/net/gnu-13/export/gnu/src/gcc/gcc/libjava/java/net/URL.java
> ./lists/gnu-src-gcc.list:/net/gnu-13/export/gnu/src/gcc/gcc/libjava/java/net/URL.java
> 
> classpath/lib/Makefile.gcj has
> 
> %.stamp: %.list
>         $(GCJF) -MD -MF ${@:.stamp=.deps} -MT $@ -MP @$<
>         echo timestamp > $@
> 
> That means lists/java-net.stamp and lists/gnu-src-gcc.stamp may be
> built at the same time, which lead to
> 
> /net/gnu-13/export/gnu/src/gcc/gcc/libjava/java/net/URL.java: In class
> 'java.net.VMNetworkInterface':
> /net/gnu-13/export/gnu/src/gcc/gcc/libjava/java/net/URL.java: In method
> 'java.net.VMNetworkInterface.getInterfaces()':
> /net/gnu-13/export/gnu/src/gcc/gcc/libjava/java/net/URL.java:1: fatal
> error: can't create ./java/rmi/activation/ActivationSystem.class: No
> such file or directory
> compilation terminated.
> make[8]: *** [lists/gnu-src-gcc.stamp] Error 1
> 
> 
> H.J.



More information about the Gcc-patches mailing list