]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Avoid recursion in VG_(exit).
authorNicholas Nethercote <njn@valgrind.org>
Tue, 9 Jun 2009 22:46:32 +0000 (22:46 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Tue, 9 Jun 2009 22:46:32 +0000 (22:46 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10285

coregrind/m_libcassert.c

index b6bdbbee3d7e9f19e18bce48a8e8c3a051fd36d1..8e3eba2f9f7cc6e3cfef0405a2569e42cde34408 100644 (file)
@@ -107,7 +107,10 @@ void VG_(exit)( Int status )
 #  error Unknown OS
 #endif
    /*NOTREACHED*/
-   VG_(core_panic)("VG_(exit) didn't work?");
+   // We really shouldn't reach here.  Just in case we do, use some very crude
+   // methods to force abort
+   __builtin_trap();
+   *(volatile Int*)0 = 'x';
 }
 
 // Print the scheduler status.