From: Nicholas Nethercote Date: Tue, 9 Jun 2009 22:46:32 +0000 (+0000) Subject: Avoid recursion in VG_(exit). X-Git-Tag: svn/VALGRIND_3_5_0~512 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17ae73a35664642dd889f9a6fca2d177fbe9cd26;p=thirdparty%2Fvalgrind.git Avoid recursion in VG_(exit). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10285 --- diff --git a/coregrind/m_libcassert.c b/coregrind/m_libcassert.c index b6bdbbee3d..8e3eba2f9f 100644 --- a/coregrind/m_libcassert.c +++ b/coregrind/m_libcassert.c @@ -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.