[Webkit-unassigned] [Bug 144378] New: LazyNeverDestroyed is not thread safe in debug builds, causing assertions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 28 23:57:50 PDT 2015


            Bug ID: 144378
           Summary: LazyNeverDestroyed is not thread safe in debug builds,
                    causing assertions
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ap at webkit.org
                CC: akling at apple.com, andersca at apple.com,
                    cdumez at apple.com, zan at falconsigh.net

Thread 28 Crashed:: WebCore: Worker
0   com.apple.JavaScriptCore          0x00000001128509da WTFCrash + 42 (Assertions.cpp:321)


1   com.apple.JavaScriptCore          0x0000000112862ed2 WTF::LazyNeverDestroyed<std::__1::mutex>::asPtr() + 66 (NeverDestroyed.h:102)
2   com.apple.JavaScriptCore          0x0000000112862e85 WTF::LazyNeverDestroyed<std::__1::mutex>::operator std::__1::mutex&() + 21 (NeverDestroyed.h:94)
3   com.apple.JavaScriptCore          0x0000000112862161 WTF::cachedCollatorMutex() + 577 (CollatorICU.cpp:62)
4   com.apple.JavaScriptCore          0x0000000112861c8b WTF::Collator::Collator(char const*, bool) + 43 (CollatorICU.cpp:120)
5   com.apple.JavaScriptCore          0x0000000112861c4c WTF::Collator::Collator(char const*, bool) + 44 (CollatorICU.cpp:146)
6   com.apple.JavaScriptCore          0x0000000112788a4b JSC::stringProtoFuncLocaleCompare(JSC::ExecState*) + 155 (StringPrototype.cpp:1429)

LazyNeverDestroyed has a non-trivial constructor in debug builds, which is obviously wrong to have for the pattern we normally use it with.

static std::mutex& cachedCollatorMutex()
    static std::once_flag onceFlag;

    static LazyNeverDestroyed<std::mutex> mutex;
    std::call_once(onceFlag, []{

    return mutex;

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150429/5d3644f5/attachment.html>

More information about the webkit-unassigned mailing list