[PATCH] D21982: WIP: Implement a per-thread inmemory log

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 5 22:11:21 PDT 2016


majnemer added inline comments.

================
Comment at: lib/xray/xray_inmemory_log.cc:80
@@ +79,3 @@
+    assert(static_cast<uint64_t>(Written) <= TotalBytes);
+    assert(Written % sizeof(XRayRecord) == 0);
+    TotalBytes -= Written;
----------------
ISTM that this assert can fail in practice.

I'd maintain the buffer you are trying to write as just a `char *` to correctly handle this.


http://reviews.llvm.org/D21982





More information about the llvm-commits mailing list