harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deven You <devyo...@gmail.com>
Subject Re: [classlib][luni] String.toLowerCase/toUpperCase incorrect for supplementary characters (HARMONY-6649)
Date Fri, 24 Sep 2010 13:10:44 GMT
Hi Mohan,
I can not build harmony when update to r1000708. Ant returns below errors:

-build-native-common:
     [echo] Making "" in src/main/native/common/unix
     [exec] cc -DLINUX -DLINUX_X86 -DHYX86 -DIPv6_FUNCTION_SUPPORT
-D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/home/deven/hy5/deploy/include
-I/home/deven/hy5/deploy/jdk/include -I. -I../shared/ -ggdb -O0 -fpic
-march=pentium3  -Werror   -c -o ../shared/libglob.o ../shared/libglob.c
     [exec] In file included from ../shared/libglob.c:25:
     [exec] /home/deven/hy5/deploy/include/vmi.h:31:17: error: jni.h: No
such file or directory
     [exec] In file included from /home/deven/hy5/deploy/include/vmi.h:33,
     [exec]                  from ../shared/libglob.c:25:
/home/deven/hy5/deploy/include/hyvmls.h:43: error: expected ‘)’ before ‘*’
token
     [exec] /home/deven/hy5/deploy/include/hyvmls.h:44: error: expected ‘;’
before ‘void’
     [exec] In file included from ../shared/libglob.c:25:
     [exec] /home/deven/hy5/deploy/include/vmi.h:75: error: expected ‘)’
before ‘*’ token
     [exec] /home/deven/hy5/deploy/include/vmi.h:102: error: expected ‘)’
before ‘*’ token
     [exec] /home/deven/hy5/deploy/include/vmi.h:104: error: expected ‘;’
before ‘JavaVM’
     [exec] /home/deven/hy5/deploy/include/vmi.h:128: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘VMI_GetVMIFromJNIEnv’
     [exec] /home/deven/hy5/deploy/include/vmi.h:133: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘VMI_GetVMIFromJavaVM’
     [exec] In file included from ../shared/libglob.c:25:
     [exec] /home/deven/hy5/deploy/include/vmi.h:158: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CheckVersion’
     [exec] /home/deven/hy5/deploy/include/vmi.h:170: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
     [exec] /home/deven/hy5/deploy/include/vmi.h:187: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘GetPortLibrary’
     [exec] /home/deven/hy5/deploy/include/vmi.h:200: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘GetVMLSFunctions’
     [exec] /home/deven/hy5/deploy/include/vmi.h:227: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘GetZipCachePool’
     [exec] /home/deven/hy5/deploy/include/vmi.h:244: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
     [exec] /home/deven/hy5/deploy/include/vmi.h:258: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘GetSystemProperty’
     [exec] /home/deven/hy5/deploy/include/vmi.h:278: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SetSystemProperty’
     [exec] /home/deven/hy5/deploy/include/vmi.h:295: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CountSystemProperties’
     [exec] /home/deven/hy5/deploy/include/vmi.h:313: error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘IterateSystemProperties’
     [exec] In file included from ../shared/jclglob.h:29,
     [exec]                  from ../shared/libglob.c:26:
     [exec] /home/deven/hy5/deploy/include/libglob.h:34: error: expected
‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘JNICALL’
     [exec] /home/deven/hy5/deploy/include/libglob.h:35: error: expected
‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ClearLibDetach’
     [exec] ../shared/libglob.c:33: error: expected ‘)’ before ‘*’ token
     [exec] ../shared/libglob.c:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘JNICALL’
     [exec] ../shared/libglob.c:83: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘ClearLibDetach’
     [exec] ../shared/libglob.c:115: error: expected ‘)’ before ‘*’ token
     [exec] make: *** [../shared/libglob.o] Error 1


I think your failure may be due to this error.

2010/9/24 Mohanraj Loganathan <mohanraj.l@gmail.com>

> Hi Deven,
>
> I followed your steps 1 & 2. But java -version crashes with Harmony5.0
>
> Attaching the out file of java -version.
>
> Thanks and Regards,
> Mohan
>
>
> 2010/9/24 Deven You <devyoudw@gmail.com>:
> > I have saw the error before, and I have some investigation of it. I think
> > the root cause is the commit change the class load order. Before this
> > commit, Locale class will be loaded before ULocale class And after this
> > commit, ULocale is loaded before Locale.
> >
> > The direct cause is CharsetProviderImpl no longer use String.toUpperCase,
> > instead it uses its own toUpperCase.  And String.toUpperCase calls
> > String.toUpperCase(Locale), this ensure Locale class will be loaded
> before
> > ULocale. However CharsetProviderImpl own toUpperCase uses no Locale, so
> it
> > causes Locale class loaded after ULocale.
> >
> > To solve this problem, a work around could simply be below:
> > 1.Add a Locale static field in String:
> > private static Locale defaulLocale = new Locale.getDefaultLocale();
> > ...
> > 2. Change the String.toUpperCase() from calling
> > toUpperCase(Locale.getDefaultLocale()) to toUpperCase(defaultLocale)
> >
> > above change could solve the NullPointerException mentioned by Mohan, but
> I
> > am not sure if it is a good design.
> >
> > Caused by: java.lang.NullPointerException
> >       at com.ibm.icu.util.ULocale.getName(ULocale.java:827)
> >       at com.ibm.icu.util.ULocale.<init>(ULocale.java:480)
> >       at java.util.Locale.<init>(Locale.java:228)
> >       at java.util.Locale.<init>(Locale.java:201)
> >       at java.util.Locale.<clinit>(Locale.java:51)
> >       at com.ibm.icu.util.ULocale.<clinit>(ULocale.java:109)
> >
> >
> >
> >
> >
> > 2010/9/24 Mohanraj Loganathan <mohanraj.l@gmail.com>
> >
> >> On loading junit.jar[2] i get initialization exception[3]. This
> >> exception disappears if i revert the patch committed for
> >> (HARMONY-6649) toUpper/toLowerCase.
> >>
> >> Make sure your junit.jar contains the signature files[1]. (use the
> >> junit.jar(version 3.8.2) bundled with eclipse).  So with HARMONY-6649
> >> commit, I am not able to load the jar file if it's manifest contains
> >> any signature related files. Any thought on this?
> >>
> >>
> >> [1] jar -tvf junit.jar
> >>  9714 Thu Aug 07 12:04:14 GMT+05:30 2008 META-INF/MANIFEST.MF
> >>  9791 Thu Aug 07 12:04:14 GMT+05:30 2008 META-INF/ECLIPSE.SF
> >>  3487 Thu Aug 07 12:04:14 GMT+05:30 2008 META-INF/ECLIPSE.RSA
> >>     0 Fri Mar 03 15:22:26 GMT+05:30 2006 META-INF/
> >>    76 Thu Aug 07 12:04:08 GMT+05:30 2008 META-INF/eclipse.inf
> >>     0 Fri Mar 03 15:22:10 GMT+05:30 2006 junit/
> >>     0 Fri Mar 03 15:22:26 GMT+05:30 2006 junit3.8.2/
> >>     0 Fri Mar 03 15:22:24 GMT+05:30 2006 junit/awtui/
> >>      ............
> >>
> >> [2] run command : java -cp junit.jar junit.textui.TestRunner
> >>
> >> [3] Exception:
> >> Uncaught exception in main:
> >> java.lang.ExceptionInInitializerError
> >>        at com.ibm.icu.util.ULocale.<clinit>(ULocale.java:109)
> >>        at
> >> com.ibm.icu.impl.ICUResourceBundle.instantiateBundle(ICUResourceBundl
> >> e.java:810)
> >>        at
> >> com.ibm.icu.impl.ICUResourceBundle.getBundleInstance(ICUResourceBundl
> >> e.java:801)
> >>        at
> >> com.ibm.icu.util.UResourceBundle.getRootType(UResourceBundle.java:489
> >> )
> >>        at
> >> com.ibm.icu.util.UResourceBundle.instantiateBundle(UResourceBundle.ja
> >> va:536)
> >>        at
> >> com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle.ja
> >> va:144)
> >>        at
> >> com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle.ja
> >> va:124)
> >>        at com.ibm.icu.impl.ZoneMeta.getSystemTimeZone(ZoneMeta.java:509)
> >>        at com.ibm.icu.util.TimeZone.getTimeZone(TimeZone.java:617)
> >>        at com.ibm.icu.util.TimeZone.getTimeZone(TimeZone.java:587)
> >>        at java.util.SimpleTimeZone$1.run(SimpleTimeZone.java:50)
> >>        at java.util.SimpleTimeZone$1.run(SimpleTimeZone.java:1)
> >>        at
> >> java.security.AccessController.doPrivilegedImpl(AccessController.java
> >> :171)
> >>        at
> >> java.security.AccessController.doPrivileged(AccessController.java:53)
> >>
> >>        at
> java.util.SimpleTimeZone.getICUTimeZone(SimpleTimeZone.java:48)
> >>        at java.util.SimpleTimeZone.<init>(SimpleTimeZone.java:110)
> >>        at java.util.TimeZone.<clinit>(TimeZone.java:91)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1Time.getDecodedObject(ASN1Time.j
> >> ava:51)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1UTCTime.decode(ASN1UTCTime.java:
> >> 96)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1Choice.decode(ASN1Choice.java:32
> >> 0)
> >>        at
> >> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInput
> >> Stream.java:665)
> >>        at
> >> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInput
> >> Stream.java:125)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav
> >> a:48)
> >>        at
> >> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInput
> >> Stream.java:665)
> >>        at
> >> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInput
> >> Stream.java:125)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav
> >> a:48)
> >>        at
> >> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInput
> >> Stream.java:665)
> >>        at
> >> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInput
> >> Stream.java:125)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav
> >> a:48)
> >>        at
> >> org.apache.harmony.security.asn1.BerInputStream.decodeValueCollection
> >> (BerInputStream.java:755)
> >>        at
> >> org.apache.harmony.security.asn1.BerInputStream.readSetOf(BerInputStr
> >> eam.java:733)
> >>        at
> >> org.apache.harmony.security.asn1.DerInputStream.readSetOf(DerInputStr
> >> eam.java:138)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1SetOf.decode(ASN1SetOf.java:48)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1Implicit.decode(ASN1Implicit.jav
> >> a:140)
> >>        at
> >> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInput
> >> Stream.java:665)
> >>        at
> >> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInput
> >> Stream.java:125)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav
> >> a:48)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1Type.decode(ASN1Type.java:97)
> >>        at
> >> org.apache.harmony.security.pkcs7.ContentInfo$1.getDecodedObject(Cont
> >> entInfo.java:153)
> >>        at
> >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav
> >> a:53)
> >>        at
> >> org.apache.harmony.security.utils.JarUtils.verifySignature(JarUtils.j
> >> ava:73)
> >>        at
> java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:296)
> >>        at
> java.util.jar.JarVerifier.readCertificates(JarVerifier.java:265)
> >>        at java.util.jar.JarFile.getInputStream(JarFile.java:392)
> >>        at
> >> java.net.URLClassLoader$URLJarHandler.createClass(URLClassLoader.java
> >> :402)
> >>        at
> >> java.net.URLClassLoader$URLJarHandler.findClass(URLClassLoader.java:3
> >> 71)
> >>        at
> java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1209)
> >>        at java.net.URLClassLoader$4.run(URLClassLoader.java:901)
> >>        at java.net.URLClassLoader$4.run(URLClassLoader.java:1)
> >>        at
> >> java.security.AccessController.doPrivilegedImpl(AccessController.java
> >> :171)
> >>        at
> >> java.security.AccessController.doPrivileged(AccessController.java:64)
> >>
> >>        at java.net.URLClassLoader.findClass(URLClassLoader.java:903)
> >>        at java.lang.ClassLoader.loadClass(ClassLoader.java:488)
> >>        at
> >> java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:87
> >> 0)
> >>        at java.lang.ClassLoader.loadClass(ClassLoader.java:267)
> >> Caused by: java.lang.NullPointerException
> >>        at com.ibm.icu.util.ULocale.getName(ULocale.java:827)
> >>        at com.ibm.icu.util.ULocale.<init>(ULocale.java:480)
> >>        at java.util.Locale.<init>(Locale.java:228)
> >>        at java.util.Locale.<init>(Locale.java:201)
> >>        at java.util.Locale.<clinit>(Locale.java:51)
> >>        at com.ibm.icu.util.ULocale.<clinit>(ULocale.java:109)
> >>        ... 54 more
> >> FAILED to invoke JVM.
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Fri, Sep 24, 2010 at 11:57 AM, Tim Ellison <t.p.ellison@gmail.com>
> >> wrote:
> >> > On 24/Sep/2010 06:58, Robert Muir wrote:
> >> >> On Fri, Sep 24, 2010 at 1:49 AM, Tim Ellison <t.p.ellison@gmail.com>
> >> wrote:
> >> >>
> >> >>> System.out.println(new File("σ.txt").hashCode());
> >> >>> System.out.println(new File("ς.txt").hashCode());
> >> >>>
> >> >>> prints out
> >> >>>
> >> >>> 889962580
> >> >>> 890776533
> >> >>>
> >> >>> on both Harmony and the RI.
> >> >>>
> >> >>>
> >> >> but perhaps this is just a bug in the RI?
> >> >> according to the link:
> >> >>
> >>
> http://download.oracle.com/javase/6/docs/api/java/io/File.html#hashCode%28%29
> >> >> <
> >>
> http://download.oracle.com/javase/6/docs/api/java/io/File.html#hashCode%28%29
> >> >Because
> >> >> equality of abstract pathnames is inherently system-dependent, so is
> the
> >> >> computation of their hash codes.
> >> >>
> >> >> Is it a problem that "windows equals" is inconsistent with hashCode
> >> here? I
> >> >> admit these are corner cases.
> >> >
> >> > No, I don't think it is a problem.  I was reviewing the invokers of
> >> > toLowerCase() and was confused by the wording in the spec.  I'm happy
> >> > that we should simply lowercase it in a locale independent way, and
> >> > don't need to do a "windows equals" implementation.
> >> >
> >> > Regards,
> >> > Tim
> >> >
> >>
> >>
> >>
> >> --
> >> Mohan
> >>
> >
>
>
>
> --
> Mohan
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message