More verbose check in AppendString.
authorAlexander Potapenko <glider@google.com>
Mon, 28 May 2012 15:00:45 +0000 (15:00 +0000)
committerAlexander Potapenko <glider@google.com>
Mon, 28 May 2012 15:00:45 +0000 (15:00 +0000)
llvm-svn: 157580

compiler-rt/lib/asan/asan_printf.cc

index 4f08f54..69c34fa 100644 (file)
@@ -88,7 +88,7 @@ static inline int AppendSignedDecimal(char **buff, const char *buff_end,
 static inline int AppendString(char **buff, const char *buff_end,
                                const char *s) {
   // Avoid library functions like stpcpy here.
-  RAW_CHECK(s);
+  RAW_CHECK_MSG(s, "Error: passing a NULL pointer to AppendString\n");
   int result = 0;
   for (; *s; s++) {
     result += AppendChar(buff, buff_end, *s);