bootstrapping problem with StringBuilder

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Edwin Steiner wrote:
> I'm testing cacao with an "ecj -target 1.5"-compiled classpath in
> addition to the jikes-compiled classpath I normally use. With ecj I
> ran into a bootstrapping problem that made both cacao and jamvm fail:
> 
> What makes the difference is that ecj uses StringBuilder instead of
> StringBuffer in gnu/classpath/SystemProperties.<clinit>()V.
> 
> StringBuilder uses System.arraycopy, which in turn requires executing
> System.<clinit>, which indirectly needs 
> gnu/classpath/SystemProperties.getProperty,
> which in turn throws a NullPointerException because the system
> properties have not yet been initialized.
> 
> A solution to this is to use VMSystem.arraycopy instead of
> System.arraycopy. (StringBuffer already does that.)

Good catch! I've checked in a patch to change all uses of
System.arraycopy in StringBuilder to VMSystem.arraycopy.

Thanks,
Jeroen


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux