[PATCH] correct GDBRegistrar thread-safety

Kaylor, Andrew andrew.kaylor at intel.com
Mon Oct 14 10:01:19 PDT 2013


Hi Jim,

The patch looks good!

The extra scope brackets in deregisterObjectInternal are no longer necessary after your changes so they can be removed too.

Do you have commit access?  If not, I can commit this for you.

Thanks,
Andy

-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Jim Kearney
Sent: Monday, October 14, 2013 9:32 AM
To: llvm-commits at cs.uiuc.edu
Subject: [PATCH] correct GDBRegistrar thread-safety

Please review the attached patch which is intended to fix http://llvm.org/bugs/show_bug.cgi?id=15750. If it's acceptable, please commit it.

It fixes two problems:
- use ManagedStatic<> to avoid initialization order problems
- lock when modifying singleton state; incorrect locking here caused multi-threaded MCJIT to core due to races.

Thanks,
J. Kearney






More information about the llvm-commits mailing list