harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li" <xiaofeng...@gmail.com>
Subject Re: [jira] Commented: (HARMONY-5225) [drlvm] DRLVM build crash on zh_CN locale even for helloworld
Date Tue, 04 Dec 2007 23:54:47 GMT
On Dec 4, 2007 11:30 PM, Gregory Shimansky (JIRA) <jira@apache.org> wrote:
>
>     [ https://issues.apache.org/jira/browse/HARMONY-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12548274
]
>
> Gregory Shimansky commented on HARMONY-5225:
> --------------------------------------------
>
> I found the cause of the problem. The reason is that VM searches for libraries loaded
with System.loadLibrary first in the bin directory. So it cannot find libraries in bin\default
that are located with VM. So VM has to create UnsatisfiedLinkError to throw it back to Java
and then Java code would try another path.
>
> This exception is created with localized string, e.g.
>
> could not load library d:\harmony\gregory\trunk\working_vm\build\win_ia32_msvc_debug\deploy\jdk\jre\bin\\gc_gen_uncomp.dll;
找不到指定的模块。
>
> But this string comes from Windows as wide char string, not as UTF-8 multibyte string.
So UTF code in VM cannot create a String object from this string because it is not a valid
UTF-8 string. Instead VM gives an error for creating this string, this error is treated as
OOME (since String could not be created) and then a crash happens because of a bug in exceptions
code.
>
> I fixed bug in exceptions code and made a hack to convert system error string from wchars
to multibyte UTF-8, then test worked. Now I need to create a pretty patch that would also
work on Linux.
>

Great!

> > [drlvm] DRLVM build crash on zh_CN locale even for helloworld
> > -------------------------------------------------------------
> >
> >                 Key: HARMONY-5225
> >                 URL: https://issues.apache.org/jira/browse/HARMONY-5225
> >             Project: Harmony
> >          Issue Type: Bug
> >          Components: DRLVM
> >         Environment: winxp sp2, ia32, zh_CN locale
> >            Reporter: Paulex Yang
> >            Priority: Blocker
> >             Fix For: 5.0M4
> >
> >
> > Both release and debug build of DRLVM crash on my thinkpad even running a helloworld,
it disappears if changing the default locale to en_US.  Seems GCHelper's native library cannot
be loaded successfully. IBM VME works OK in same environment.
> > Error message:
> > Windows reported exception: 0xc0000005
> > Registers:
> >     EAX: 0x00f6fc80, EBX: 0x00000000, ECX: 0x00000000, EDX: 0x00000000
> >     ESI: 0x00000000, EDI: 0x124a84fc, ESP: 0x0013eeb8, EBP: 0x007c4070
> >     EIP: 0x0065d00a
> > Stack trace:
> >   0: exn_raise_object_internal (d:\projects\harmony\subversion\working_vm\vm\vmcore\src\exception\exceptions_impl.cpp:390)
> >   1: std::ctype<char>::`RTTI Complete Object Locator' (??:-1)
> >   2: java/lang/VMClassRegistry.loadLibrary(Ljava/lang/String;Ljava/lang/ClassLoader;)V
(VMClassRegistry.java:-2)
> >   3: java/lang/Runtime.load0(Ljava/lang/String;Ljava/lang/ClassLoader;Z)V (Runtime.java:722)
> >   4: java/lang/Runtime.loadLibrary0(Ljava/lang/String;Ljava/lang/ClassLoader;Z)V
(Runtime.java:798)
> >   5: java/lang/System.loadLibrary(Ljava/lang/String;)V (System.java:223)
> >   6: org/apache/harmony/drlvm/gc_gen/GCHelper.<clinit>()V (GCHelper.java:30)
> > <end of stack trace>
> > Procedure to reproduce:
> > 1. Got a winxp with zh_CN locale
> > 2. build DRLVM or federated build.
> > 3. Run helloworld
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>



-- 
http://xiao-feng.blogspot.com
Mime
View raw message