]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Consistently use exit code 1 (== POSIX's EXIT_FAILURE) if things
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 9 Aug 2015 20:29:18 +0000 (20:29 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 9 Aug 2015 20:29:18 +0000 (20:29 +0000)
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.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15515

coregrind/m_replacemalloc/vg_replace_malloc.c
shared/vg_replace_strmem.c

index 76efc1052df46a03fcc48207b16eb5a7ae2148c9..604e05a61b665bfe4d8446413238a313344d32d5 100644 (file)
@@ -1078,8 +1078,7 @@ static void panic(const char *str) __attribute__((unused));
 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) \
index e0926183983fbc2e867c1a3c1e71f912978a0c52..0f2cb7d5bfb973cfec4f45cb2a90b9db34a2c2f4 100644 (file)
@@ -1325,7 +1325,7 @@ static inline void my_exit ( int x )
       VALGRIND_PRINTF_BACKTRACE( \
          "*** memmove_chk: buffer overflow detected ***: " \
          "program terminated\n"); \
-     my_exit(127); \
+     my_exit(1); \
      /*NOTREACHED*/ \
      return NULL; \
    }
@@ -1417,7 +1417,7 @@ static inline void my_exit ( int x )
       VALGRIND_PRINTF_BACKTRACE( \
          "*** strcpy_chk: buffer overflow detected ***: " \
          "program terminated\n"); \
-     my_exit(127); \
+     my_exit(1); \
      /*NOTREACHED*/ \
      return NULL; \
    }
@@ -1452,7 +1452,7 @@ static inline void my_exit ( int x )
       VALGRIND_PRINTF_BACKTRACE( \
          "*** stpcpy_chk: buffer overflow detected ***: " \
          "program terminated\n"); \
-     my_exit(127); \
+     my_exit(1); \
      /*NOTREACHED*/ \
      return NULL; \
    }
@@ -1552,7 +1552,7 @@ static inline void my_exit ( int x )
       VALGRIND_PRINTF_BACKTRACE( \
          "*** memcpy_chk: buffer overflow detected ***: " \
          "program terminated\n"); \
-     my_exit(127); \
+     my_exit(1); \
      /*NOTREACHED*/ \
      return NULL; \
    }