[compiler-rt] r288776 - [XRay][compiler-rt] Explicitly initialise members.
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 22:58:16 PST 2016
Author: dberris
Date: Tue Dec 6 00:58:15 2016
New Revision: 288776
URL: http://llvm.org/viewvc/llvm-project?rev=288776&view=rev
Log:
[XRay][compiler-rt] Explicitly initialise members.
Before this, the change committed in D26232 might have an uninitialised
std::atomic<bool> that may or may not have a valid state. On aarch64
this breaks consistently, while it doesn't manifest as a problem in
x86_64.
This is an attempt to un-break this in aarch64.
Modified:
compiler-rt/trunk/lib/xray/xray_buffer_queue.cc
Modified: compiler-rt/trunk/lib/xray/xray_buffer_queue.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_buffer_queue.cc?rev=288776&r1=288775&r2=288776&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_buffer_queue.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_buffer_queue.cc Tue Dec 6 00:58:15 2016
@@ -19,7 +19,7 @@
using namespace __xray;
BufferQueue::BufferQueue(std::size_t B, std::size_t N)
- : BufferSize(B), Buffers(N) {
+ : BufferSize(B), Buffers(N), Mutex(), OwnedBuffers(), Finalizing(false) {
for (auto &Buf : Buffers) {
void *Tmp = malloc(BufferSize);
Buf.Buffer = Tmp;
More information about the llvm-commits
mailing list