[Webkit-unassigned] [Bug 130283] New: Fix undefined behavior in WTF::equal() in StringImpl.h for i386/x86_64

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 14 20:30:50 PDT 2014


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

           Summary: Fix undefined behavior in WTF::equal() in StringImpl.h
                    for i386/x86_64
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: ddkilzer at webkit.org
                CC: benjamin at webkit.org


When compiling WebKit with -fcatch-undefined-behavior (UBSan), Safari crashes on launch due to undefined behavior in WTF::equal() due to casting unaligned const char* bytes to unit64_t, uint32_t, etc.

We can fix the unaligned access using memcpy, and clang will still optimize the code the exact same way (without calling memcpy for short lengths).

-- 
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