Do not pass NULL for the string in catch_errors
authorLuis Machado <lgustavo@codesourcery.com>
Mon, 26 Oct 2015 13:17:29 +0000 (11:17 -0200)
committerLuis Machado <lgustavo@codesourcery.com>
Mon, 26 Oct 2015 13:17:29 +0000 (11:17 -0200)
I caught a segmentation fault while running gdb.reverse/sigall-reverse.exp,
in a mingw32 GDB, in this code path. It boils down to the code trying to
strlen () a NULL pointer. I tracked things down and it looks like
record_full_message_wrapper_safe is the only offender.

gdb/ChangeLog:

2015-10-26  Luis Machado  <lgustavo@codesourcery.com>

* record-full.c (record_full_message_wrapper_safe): Pass empty string to
catch_errors call instead of NULL.

gdb/ChangeLog
gdb/record-full.c

index f26f233f0b1e0d852fcbcce525276415ae04cf46..f653a3d72dfdb832caff94a6645d11b690f7515c 100644 (file)
@@ -1,3 +1,8 @@
+2015-10-26  Luis Machado  <lgustavo@codesourcery.com>
+
+       * record-full.c (record_full_message_wrapper_safe): Pass empty string to
+       catch_errors call instead of NULL.
+
 2015-10-26  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * guile/scm-ports.c (ioscm_make_gdb_stdio_port): Pass non-const
index cd47dfaa3b9bf65a1a5574c1e2b667f6b94fb17b..595e357a3b5c8af5cc487d41b7e7500d6ceb3292 100644 (file)
@@ -667,7 +667,7 @@ record_full_message_wrapper_safe (struct regcache *regcache,
   args.regcache = regcache;
   args.signal = signal;
 
-  return catch_errors (record_full_message_wrapper, &args, NULL,
+  return catch_errors (record_full_message_wrapper, &args, "",
                       RETURN_MASK_ALL);
 }
 
This page took 0.030346 seconds and 4 git commands to generate.