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

            Bug ID: 15750
           Summary: GDBJITRegistrar not thread-safe (makes MCJIT not
                    thread-safe)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Generic Execution Engine Support
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

GDBJITRegistrar::(de)registerObject() accesses a member variable
ObjectBufferMap without any synchronization.  The class is used as a singleton
and so multiple instances of MCJIT try to modify that map simultaneously.

The code is written to be thread-safe with its access to gdb variables but not
with its own state, which is strange given its singleton nature.

Also, JITRegistrar::getGDBRegistrar should use ManagedStatic.  The
initialization pattern it uses is not guaranteed thread-safe.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to