I agree with Dave's comments in #3.
However, taking a closer look at gdb/cli/cli-cmds.c, I think further
changes need to be made to remove all possibility of a crash. The
behaviour of source_script_with_search() looks rather unusual in the
para-phrased snippet below (my comments prefixed by '/* XXX: '):
#-----------------------------------
old_cleanups = make_cleanup (xfree, full_path);
make_cleanup_fclose (stream);
if (stream == NULL)
{
/* XXX: since a cleanup was added for 'stream' before checking it opened
correctly, this appears to *guarantee* a crash if it didn't */
}
if (from_tty == -1)
{
/* XXX: ? this is already been done above */
make_cleanup_fclose (stream);
}
#-----------------------------------
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1069897
Title:
gdb crashes on startup if run as root via sudo and ~/.gdbinit exists
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1069897/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs