From 17ae73a35664642dd889f9a6fca2d177fbe9cd26 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Tue, 9 Jun 2009 22:46:32 +0000 Subject: [PATCH] Avoid recursion in VG_(exit). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10285 --- coregrind/m_libcassert.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coregrind/m_libcassert.c b/coregrind/m_libcassert.c index b6bdbbee3..8e3eba2f9 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.