[PATCH] D12970: SmallVector fix for use-after-dtor bug.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 17:05:34 PDT 2015


dblaikie added inline comments.

================
Comment at: include/llvm/ADT/SmallVector.h:926
@@ +925,3 @@
+      // If this wasn't grown from the inline copy, deallocate the old space.
+      free(this->begin());
+    }
----------------
This is different from the original code, why?

I assume this would introduce a bug where in big-mode it doesn't call the dtors on the elements of the vector?


http://reviews.llvm.org/D12970





More information about the llvm-commits mailing list