From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Marc Khouzam <marc.khouzam@ericsson.com>
Cc: gdb@sourceware.org
Subject: Re: Segfault in user command
Date: Tue, 21 Jul 2009 05:43:00 -0000 [thread overview]
Message-ID: <8ac60eac0907202243m6cecfc75laa21dee368e52193@mail.gmail.com> (raw)
In-Reply-To: <6D19CA8D71C89C43A057926FE0D4ADAA07BFFFFB@ecamlmw720.eamcs.ericsson.se>
On Mon, Jul 20, 2009 at 7:08 PM, Marc Khouzam<marc.khouzam@ericsson.com> wrote:
> I was trying to use 'interpreter-exec mi' inside a user-defined command,
> and GDB segfaulted (session below). It is today's version of GDB.
The problem is that in cli/cli-script.c, execute_user_command(),
instream is set to NULL:
312 /* Set the instream to 0, indicating execution of a
313 user-defined function. */
314 make_cleanup (do_restore_instream_cleanup, instream);
315 instream = (FILE *) 0;
and later used for fileno():
#0 0x00007ffff6ea19f0 in fileno_unlocked () from /lib/libc.so.6
#1 0x000000000051d2ff in gdb_setup_readline () at
../../src/gdb/event-top.c:1086
#2 0x00000000004aaa09 in mi_interpreter_resume (data=0x0) at
../../src/gdb/mi/mi-interp.c:107
#3 0x00000000005180d7 in interp_set (interp=0xa7a850, top_level=0) at
../../src/gdb/interps.c:197
#4 0x000000000051834e in interpreter_exec_cmd (args=<value optimized
out>, from_tty=<value optimized out>) at ../../src/gdb/interps.c:398
#5 0x0000000000459984 in execute_command (p=0xb295fd "t", from_tty=0)
at ../../src/gdb/top.c:442
#6 0x00000000004a2c04 in execute_control_command (cmd=0xb23c40) at
../../src/gdb/cli/cli-script.c:400
#7 0x00000000004a31ad in execute_user_command (c=0xb3fd60, args=0x0)
at ../../src/gdb/cli/cli-script.c:324
> I had seen this in passing many moons ago, but today I told myself I
> really should report it. Should I open a bugzilla about it?
Probably.
I think every crash in GDB deserves a bugzilla entry.
Cheers,
--
Paul Pluzhnikov
next prev parent reply other threads:[~2009-07-21 5:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 2:09 Marc Khouzam
2009-07-21 5:43 ` Paul Pluzhnikov [this message]
2009-07-21 9:20 ` Pedro Alves
2009-07-22 17:11 ` Marc Khouzam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8ac60eac0907202243m6cecfc75laa21dee368e52193@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=gdb@sourceware.org \
--cc=marc.khouzam@ericsson.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox