[LLVMbugs] [Bug 21806] New: Race conditions in Mach-O driver file parsing.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Dec 10 05:43:03 PST 2014


http://llvm.org/bugs/show_bug.cgi?id=21806

            Bug ID: 21806
           Summary: Race conditions in Mach-O driver file parsing.
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: devlists at shadowlab.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

lld Driver parse InputElement concurrently using a TaskGroup.

Unfortunately, the InputElement parse() implementations are not thread safe.
Especially all access to the LinkerContext should be protected by a mutex. 

For instance, when parsing Mach-O file using MachOFileNode::parse(), the parse
function  call MachOLinkingContext::addInputFileDependency and
MachOLinkingContext::registerDylib which are not thread-safe.

I got a bunch of random crash when the context try to access the _allDylibs
member after parsing and that member was corrupted by a concurrent access
during parsing.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20141210/8f85d3e9/attachment.html>


More information about the llvm-bugs mailing list