This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug java/14315] New: Java compiler is not parallel make safe


During bootstrap on a SMP machine, I got

/export/build/gnu/gcc-3.4-ia32e/build-ia32e-linux/gcc/gcj
-B/export/build/gnu/gcc-3.4-ia32e/build-ia32e-linux/ia32e-linux/libjava/
-B/export/build/gnu/gcc-3.4-ia32e/build-ia32e-linux/gcc/ --encoding=UTF-8
-Wno-deprecated -C -g -classpath '' -bootclasspath
/export/build/gnu/gcc-3.4-ia32e/build-ia32e-linux/ia32e-linux/libjava:/net/gnu/export/gnu/src/gcc-3.4/gcc/libjava
-d /export/build/gnu/gcc-3.4-ia32e/build-ia32e-linux/ia32e-linux/libjava
/net/gnu/export/gnu/src/gcc-3.4/gcc/libjava/java/util/regex/Pattern.java
/net/gnu/export/gnu/src/gcc-3.4/gcc/libjava/java/util/regex/Pattern.java: In
class `java.util.regex.Pattern':
/net/gnu/export/gnu/src/gcc-3.4/gcc/libjava/java/util/regex/Pattern.java: In
method `<clinit>()':
/net/gnu/export/gnu/src/gcc-3.4/gcc/libjava/java/util/regex/Pattern.java:1:
fatal error: can't create directory
/export/build/gnu/gcc-3.4-ia32e/build-ia32e-linux/ia32e-linux/libjava/java/util/regex:
File exists
compilation terminated.

The problem is

  while (1)
    {
      char *s = strchr (dname, sep);
      if (s == NULL)
        break;
      *s = '\0';
      if (stat (r, &sb) == -1
          /* Try to make it.  */
          && mkdir (r, 0755) == -1)
        fatal_error ("can't create directory %s: %m", r);
                                                                                
      *s = sep;
      /* Skip consecutive separators.  */
      for (dname = s + 1; *dname && *dname == sep; ++dname)
        ;
   }

in jcf-write.c. 'r' can be created between stat and mkdir.

-- 
           Summary: Java compiler is not parallel make safe
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl at lucon dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14315


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