TestOpenVsOpenRules failure

Description

ERROR : Keys are not equivalent 5x in /tscoll/capitst/TestOpenVsOpenRules

I think this is in the locale bn_IN

Activity

Show:
TracBot
July 1, 2018, 9:56 AM
Trac Comment 7 by —2011-05-16T16:19:12.351Z

Fails on linuxppc. Simplified ruleset:

TracBot
July 1, 2018, 9:56 AM
Trac Comment 8 by —2011-05-16T17:57:40.049Z

is the J version. Also, here is a simplified test version that fails on x86 but passes on ppc

TracBot
July 1, 2018, 9:56 AM
Trac Comment 9 by —2011-05-16T22:58:33.434Z

http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf

TracBot
July 1, 2018, 9:56 AM
Trac Comment 10 by —2011-05-16T23:16:52.265Z

The cause of the problem is that with the UCA 6.0 table (FractionalUCA.txt) we have many more 3-byte UCA primary weights, and when "many" (usually more than seven) characters are ordered after some reset point, they spill into 4-byte weights. Before ICU 4.6, these were spilling over from 2-byters to 3-byters.

This combined with a line of code that shifted-right a 32-bit integer by 32 bits when incrementing the last byte of a 4-byte weight. As it turns out, this operation is undefined in C99 and platform-dependent, and defined not to work as we had expected in Java.

The same problem would have happened before ICU 4.6 when tailoring after a Han-implicit character, for example, because that has long been using 3-byte and 4-byte weights.

The fix is to avoid the right-shift when it would shift by 32, and instead just setting the expected result value.

TracBot
July 1, 2018, 9:56 AM
Trac Comment 14 by —2016-10-05T23:13:19.237Z

Milestone 4.8RC deleted

Fixed

Assignee

Markus Scherer

Reporter

Steven R. Loomis

Components

Labels

None

Reviewer

None

Priority

blocks-release

Time Needed

Hours

Fix versions