You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Gregory Shimansky <gs...@gmail.com> on 2007/04/18 12:45:42 UTC

Re: [jira] Commented: (HARMONY-2669) [classlib][charsets] Working with charset ISO-2022-CN crashes DRLVM

Tim Ellison wrote:
> Gregory Shimansky wrote:
>> On Wednesday 18 April 2007 00:26 Tim Ellison wrote:
>>> Gregory Shimansky wrote:
>>>> Below is my evaluation of the bug HARMONY-2669. I think it is in ICU4JNI
>>>> native code. The possible solution for it is to recompile ICUInterface34
>>>> libraries from patched sources and file a bug on ICU meanwhile.
>>>>
>>>> I would like to know, what sources were used to compile ICU4JNI for
>>>> windows and other operation systems? I found today that ICU4JNI 3.4
>>>> contains quite a lot of memory leaks, and there is a patch to fix them in
>>>> v3.4 [1]. Was it used to compile our binaries (from what I learned while
>>>> analyzing this bug on windows 32 it *was* used)? I know that I didn't use
>>>> it when I compiled ICU for IPF because I learned about its existence only
>>>> today. Are there any other patches for ICU code that we need to use for
>>>> version 3.4?
>>>>
>>>> [1]
>>>> ftp://ftp.software.ibm.com/software/globalization/icu/icu4j/icu4jni/3.4/i
>>>> cu4jni_3_4_patch-01.zip
>>> Sorry that you had to find it the hard way Gregory.  The ICU4JNI code
>>> does have the patch applied, as described in the readme in the depends'
>>> ICU4JNI directory[1].
>> I didn't find it a hard way, I just didn't look for any patches when I created 
>> IPF binaries some time ago. I the memory leaks patch when I went to ICU site 
>> to download its sources to see what's going on when it calls VM JNI code. 
>> What I found out is that it calls VM JNI code with a wrong elems pointer and 
>> to fix the bug we need to patch ICU. The bug is present it 3.6 as well.
>>
>> So my question was actually, do we need any patches other than memory leaks 
>> patch to build ICU binaries that we have in SVN currently?
> 
> No, the code is just 3.4 with patch 1.
> 
> I'd have no objection to moving to 3.6, and asking the ICU team for an
> official patch for the elems bug.  We could use a temporary patch while
> we wait.

I think there was a suggestion to move to version 3.6 but I don't know 
what the decision was when the discussion has finished. Could someone 
remind me?

-- 
Gregory


Re: [jira] Commented: (HARMONY-2669) [classlib][charsets] Working with charset ISO-2022-CN crashes DRLVM

Posted by Tony Wu <wu...@gmail.com>.
Sorry for replying late.

I found another bug of icu4jni's native code too, as described below.

in src/native/converter/ConverterInterface.c
            jint count =32;
            UChar invalidUChars[32];
            ucnv_getInvalidUChars(cnv,invalidUChars,(int8_t*)&count,&errorCode);

The cast from jint* to int8_t* will lead to some problem in big-endian
machine, usually get zero. It was fixed in 3.6 but no patch for 3.4.


As far I know, Richard is not feeling well these days. actually I'm
preparing for upgrading both icu4jni and icu4j to 3.6.

For icu4j, it is much easier, what we need to do is just replace the
original jar file.

It is a little complex with icu4jni36. the library name is
libInterface36 rather than libInterface34, IIRC, it was hardcoded in
vm. So we may need modify and rebuild vm.

On 4/19/07, Tim Ellison <t....@gmail.com> wrote:
> Gregory Shimansky wrote:
> > I think there was a suggestion to move to version 3.6 but I don't know
> > what the decision was when the discussion has finished. Could someone
> > remind me?
>
> I was waiting for Richard to respond, since IIRC he was the one that
> looked at it.  I think he decided upgrading was the right thing to do
> (but after the milestone build please<g>).
>
> Regards,
> Tim
>
>
>


-- 
Tony Wu
China Software Development Lab, IBM

Re: [jira] Commented: (HARMONY-2669) [classlib][charsets] Working with charset ISO-2022-CN crashes DRLVM

Posted by Tim Ellison <t....@gmail.com>.
Gregory Shimansky wrote:
> I think there was a suggestion to move to version 3.6 but I don't know
> what the decision was when the discussion has finished. Could someone
> remind me?

I was waiting for Richard to respond, since IIRC he was the one that
looked at it.  I think he decided upgrading was the right thing to do
(but after the milestone build please<g>).

Regards,
Tim