This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] Fix a segfault on unexpected EOF
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Wed, 28 Feb 2007 10:59:03 -0500
- Subject: [commit] Fix a segfault on unexpected EOF
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;