[commit] Fix a segfault on unexpected EOF

Daniel Jacobowitz drow@false.org
Wed Feb 28 15:59:00 GMT 2007


This patch removes a race condition from
gdb_readline_wrapper_cleanup.  If quit() ends up called while the
prompt is displayed, the assertion will fail, because it's set only
after display_gdb_prompt returns.  That case is harmless, so I
disabled the assertion.

This showed up as a stray core file in the test directory after
gdb.objc/objcdecode.exp.

-- 
Daniel Jacobowitz
CodeSourcery

2007-02-28  Daniel Jacobowitz  <dan@codesourcery.com>

	* top.c (gdb_readline_wrapper_cleanup): Remove invalid assertion.

--- top.c	(revision 291)
+++ top.c	(local)
@@ -770,7 +770,6 @@ gdb_readline_wrapper_cleanup (void *arg)
 {
   struct gdb_readline_wrapper_cleanup *cleanup = arg;
 
-  gdb_assert (rl_already_prompted == 1);
   rl_already_prompted = cleanup->already_prompted_orig;
   PROMPT (0) = cleanup->prompt_orig;
 



More information about the Gdb-patches mailing list