Closed
Bug 316573
Opened 19 years ago
Closed 19 years ago
[FIX]HashCodeAsUTF8 doesn't work right for non-BMP chars
Categories
(Core :: XPCOM, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Keywords: crash)
Attachments
(1 file)
6.10 KB,
patch
|
smontagu
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
We crash on shutdown if we atomize a string containing non-BMP chars, because HashCodeAsUTF8 does:
347 U = PRUint32( (W1&0x03FF)<<10 | (W&0x3FFF) );
which is wrong -- it needs to add 0x10000. This has apparently been wrong as long as the code has been in our tree...
While I was here I updated the code to the more recent UTF8 RFC (which only allows sequences of up to 4 bytes).
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #203149 -
Flags: superreview?(jst)
Attachment #203149 -
Flags: review?(smontagu)
Assignee | ||
Updated•19 years ago
|
Priority: -- → P1
Target Milestone: --- → mozilla1.9alpha
Updated•19 years ago
|
Attachment #203149 -
Flags: review?(smontagu) → review+
Comment 2•19 years ago
|
||
Comment on attachment 203149 [details] [diff] [review]
Like so
sr=jst
Attachment #203149 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 3•19 years ago
|
||
Fixed.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•