[libcxxabi] r303194 - [libcxxabi] Fix the test case committed in r303175.

Akira Hatanaka via cfe-commits cfe-commits at lists.llvm.org
Tue May 16 11:18:04 PDT 2017


Author: ahatanak
Date: Tue May 16 13:18:03 2017
New Revision: 303194

URL: http://llvm.org/viewvc/llvm-project?rev=303194&view=rev
Log:
[libcxxabi] Fix the test case committed in r303175.

Free the __cxa_exception object allocated with __cxa_allocate_exception.

This is an attempt to fix this asan bot:

http://lab.llvm.org:8011/builders/libcxx-libcxxabi-x86_64-linux-ubuntu-asan/builds/560

Modified:
    libcxxabi/trunk/test/exception_object_alignment.pass.cpp

Modified: libcxxabi/trunk/test/exception_object_alignment.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/exception_object_alignment.pass.cpp?rev=303194&r1=303193&r2=303194&view=diff
==============================================================================
--- libcxxabi/trunk/test/exception_object_alignment.pass.cpp (original)
+++ libcxxabi/trunk/test/exception_object_alignment.pass.cpp Tue May 16 13:18:03 2017
@@ -28,6 +28,7 @@ int main() {
   auto i = reinterpret_cast<uintptr_t>(p);
   auto a = std::alignment_of<S>::value;
   assert(i % a == 0);
+  __cxxabiv1::__cxa_free_exception(p);
 #endif
   return 0;
 }




More information about the cfe-commits mailing list