[Webkit-unassigned] [Bug 118410] Segmentation fault occurred when ICU data library doesn't embed the expected encoding

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 10 08:41:15 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=118410


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #206390|review?, commit-queue?      |review-, commit-queue-
               Flag|                            |




--- Comment #15 from Alexey Proskuryakov <ap at webkit.org>  2013-07-10 08:43:16 PST ---
(From update of attachment 206390)
View in context: https://bugs.webkit.org/attachment.cgi?id=206390&action=review

> Source/WebCore/ChangeLog:8
> +        No new tests (OOPS!).

The patch cannot be landed with this line, a pre-commit hook will block it.

> Source/WebCore/platform/text/TextCodecICU.cpp:-72
> -    registrar("ISO-8859-8-I", "ISO-8859-8-I");

I don't see how moving this line down can work. addToTextEncodingNameMap() gets an atomic name for encoding name, so if ISO-8859-8-I is registered after enumerating ICU aliases, it will just map to ISO-8859-8. That is exactly what we are trying to avoid.

> Source/WebCore/platform/text/TextCodecICU.cpp:69
> +    WTF::HashMap<const char*, char>knownEncodings;

There shouldn't be a WTF prefix when using WTF names. Also, a missing space before knownEncodings.

Didn't you mean to use HashSet?

> Source/WebCore/platform/text/TextCodecICU.cpp:138
> +    if (knownEncodings.contains("macintosh")) {

This is not the right check. Since registrar uses an atomic name for standard name, it was fine to call it with any alias as second argument. But this check will fail.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list