| Summary: | [ARM] Incorrect handling of Unicode characters | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Dániel Bátyai <dbatyai.u-szeged> | ||||||
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | bunhere, commit-queue, darin, gyuyoung.kim, llango.u-szeged, mark.lam, ossy, rakuco, sergio | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 108645 | ||||||||
| Attachments: |
|
||||||||
|
Description
Dániel Bátyai
2014-07-29 04:36:16 PDT
Created attachment 235676 [details]
Patch
Force GCC to use signed char for char
Comment on attachment 235676 [details]
Patch
I think the better fix is to make change stringFromUTF() in jsc.cpp to explicitly use a signed char since it is dependent on signed behavior for correctness. This ensures that the code is correct independent of build configurations. Are there other places where you’ve found the “sign”-ness of chars to be an issue?
Comment on attachment 235676 [details]
Patch
I think this change is OK, but I also think we should fix the code to not depend on char being signed. I don’t think we need to change the type to “signed char” — we can and should just remove the dependency.
Let me go further. We should remove the silly optimization in stringFromUTF. If we need a fast case for ASCII, that should be inside the fromUTF8WithLatin1Fallback function, not in the JSC tool. Please submit a patch that deletes the misguided “fast case” code from jsc.cpp. Created attachment 236100 [details]
Patch
Removed fast case, as suggested.
Comment on attachment 236100 [details] Patch Clearing flags on attachment: 236100 Committed r172152: <http://trac.webkit.org/changeset/172152> All reviewed patches have been landed. Closing bug. |