harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fedotov, Alexei A" <alexei.a.fedo...@intel.com>
Subject RE: [jira] Created: (HARMONY-100) text/BidiWrapper issue?
Date Thu, 05 Oct 2006 16:22:14 GMT
Alexey (Ivanov), Alexey (Petrenko), All,

Could anyone please volunteer to resolve this issue
(http://issues.apache.org/jira/browse/HARMONY-100)? Not only it has a
very nice number, but also blocks a fair amount of unit tests.

This shouldn't be incredibly hard - Tim added an excellent comment to
the issue description which contains an idea of a suggested fix.

With best regards,
Alexei Fedotov,
Intel Middleware Products Division

>-----Original Message-----
>From: Tim Ellison [mailto:t.p.ellison@gmail.com]
>Sent: Friday, February 17, 2006 3:45 PM
>To: harmony-dev@incubator.apache.org
>Subject: Re: [jira] Created: (HARMONY-100) text/BidiWrapper issue?
>
>congratulations -- you are our 100th customer!  Step over here for your
>special gift.
>
>(Too bad Svetlana, you missed out after all that hard work :-) ).
>
>Tim
>
>Vladimir Gorr (JIRA) wrote:
>> text/BidiWrapper issue?
>> -----------------------
>>
>>          Key: HARMONY-100
>>          URL: http://issues.apache.org/jira/browse/HARMONY-100
>>      Project: Harmony
>>         Type: Bug
>>     Reporter: Vladimir Gorr
>>
>>
>> Let's consider the following test:
>>
>> import java.text.Bidi;
>> public class Test {
>> 	public static void main(String[] args) throws Exception {
>> 		Bidi bd = new Bidi(new char[] { 's', 's', 's' }, 0,
>> 				new byte[] { (byte) -7,	(byte) -2,
(byte) -3 },
>> 				0, 3,
Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT);
>> 		System.out.println("Expected 7, real " + "     " +
>bd.getLevelAt(0));
>> 	}
>> }
>>
>> In my opinion the JNI implementation of Bidi (text/BidiWrapper.c
file,
>ubidi_1setPara() function) contains a potential bug, namely:
>> 1. If  the embeddingLevels  argument is not NULL then
_embeddingLevels
>variable is initialized with the JNI GetByteArrayElements() function;
>> 2. ICU function (ubidi_setPara) initializes ICU inner structure and
puts
>the _embeddingLevels into it;
>> 3. If _embeddingLevels pointer is not NULL then the JNI
>ReleaseByteArrayElements() function (with 0 as fourth parameter) is
called.
>>     This function releases the memory (according to JNI
specification)
>the _embeddingLevels pointer refers to;
>> 4. After that ICU inner structure isn't initialized properly. Call of
ICU
>ubidi_getLevels() function can return incorrect values (see java test
>above).
>>
>> It seems the JNI_COMMIT parameter instead of "0" should be passed to
the
>ReleaseByteArrayElements() to avoid this problem.
>>
>> I'd like to underline the test mentioned above works w/o any issues
for
>Harmony-14 contribution (although it shouldn't sometimes IMHO).
>> Therefore if there are any doubts in my argumentation this issue can
be
>closed as invalid.
>>
>>
>
>--
>
>Tim Ellison (t.p.ellison@gmail.com)
>IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message