|
From: <sv...@va...> - 2015-08-09 20:29:26
|
Author: florian
Date: Sun Aug 9 21:29:18 2015
New Revision: 15515
Log:
Consistently use exit code 1 (== POSIX's EXIT_FAILURE) if things
go wrong. As we can tell from the error messages what whent wrong
there is no need to have different exit codes to distinguish.
Spotted by Matthias Schwarzott.
Modified:
trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
trunk/shared/vg_replace_strmem.c
Modified: trunk/coregrind/m_replacemalloc/vg_replace_malloc.c
==============================================================================
--- trunk/coregrind/m_replacemalloc/vg_replace_malloc.c (original)
+++ trunk/coregrind/m_replacemalloc/vg_replace_malloc.c Sun Aug 9 21:29:18 2015
@@ -1078,8 +1078,7 @@
static void panic(const char *str)
{
VALGRIND_PRINTF_BACKTRACE("Program aborting because of call to %s\n", str);
- my_exit(99);
- *(volatile int *)0 = 'x';
+ my_exit(1);
}
#define PANIC(soname, fnname) \
Modified: trunk/shared/vg_replace_strmem.c
==============================================================================
--- trunk/shared/vg_replace_strmem.c (original)
+++ trunk/shared/vg_replace_strmem.c Sun Aug 9 21:29:18 2015
@@ -1325,7 +1325,7 @@
VALGRIND_PRINTF_BACKTRACE( \
"*** memmove_chk: buffer overflow detected ***: " \
"program terminated\n"); \
- my_exit(127); \
+ my_exit(1); \
/*NOTREACHED*/ \
return NULL; \
}
@@ -1417,7 +1417,7 @@
VALGRIND_PRINTF_BACKTRACE( \
"*** strcpy_chk: buffer overflow detected ***: " \
"program terminated\n"); \
- my_exit(127); \
+ my_exit(1); \
/*NOTREACHED*/ \
return NULL; \
}
@@ -1452,7 +1452,7 @@
VALGRIND_PRINTF_BACKTRACE( \
"*** stpcpy_chk: buffer overflow detected ***: " \
"program terminated\n"); \
- my_exit(127); \
+ my_exit(1); \
/*NOTREACHED*/ \
return NULL; \
}
@@ -1552,7 +1552,7 @@
VALGRIND_PRINTF_BACKTRACE( \
"*** memcpy_chk: buffer overflow detected ***: " \
"program terminated\n"); \
- my_exit(127); \
+ my_exit(1); \
/*NOTREACHED*/ \
return NULL; \
}
|