summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2015-02-09 02:17:21 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2015-02-09 02:17:21 +0000
commit492377c13f5239980005bc551fb37b2b0c6cb51e (patch)
treeece8cbcc3339340563db9ebb7d0ed4789451f10d /contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp
parent04847b0c514062f3113985d59e6d03a6fa5bf21c (diff)
downloadFreeBSD-src-492377c13f5239980005bc551fb37b2b0c6cb51e.zip
FreeBSD-src-492377c13f5239980005bc551fb37b2b0c6cb51e.tar.gz
Fix an extremely subtle concurrency bug triggered by running on 32-thread
POWER8 systems. During thread switch, there was a very small window when the stack pointer was set to the stack pointer of the outgoing thread, but after the lock on that thread had already been released. If, during that window, the outgoing thread were rescheduled on another CPU and begin execution and an exception were taken on the original CPU, the trap handler and the outgoing thread would simultaneously execute on the same stack, causing memory corruption. Fix this by making sure to release the old thread only after cpu_switch() is done with its stack. MFC after: 2 weeks Sponsored by: FreeBSD Foundation
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud