[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2013-05-19 Thread Bug Watch Updater
** Changed in: gdb (Debian)
   Status: New = Fix Released

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-11-27 Thread Sebastien Bacher
** Changed in: gdb (Ubuntu)
   Status: Triaged = Fix Committed

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-11-27 Thread Launchpad Bug Tracker
** Branch linked: lp:ubuntu/raring-proposed/gdb

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-11-27 Thread Launchpad Bug Tracker
This bug was fixed in the package gdb - 7.5-0ubuntu3

---
gdb (7.5-0ubuntu3) raring; urgency=low

  * Remove excessive fclose in gdbinit patch (LP: #1069897)
 -- d...@treblig.org (Dr. David Alan Gilbert)   Sat, 24 Nov 2012 16:54:53 +

** Changed in: gdb (Ubuntu)
   Status: Fix Committed = Fix Released

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-11-26 Thread James Hunt
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-11-25 Thread Bug Watch Updater
** Changed in: gdb (Debian)
   Status: Unknown = New

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-11-24 Thread Dave Gilbert
My full backtrace on this (quantal 64bit):
#0  0x7f8710ffe425 in __GI_raise (sig=optimised out) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
resultvar = 0
pid = optimised out
selftid = 9345
#1  0x7f8711001b8b in __GI_abort () at abort.c:91
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x4, sa_sigaction = 0x4}, 
sa_mask = {__val = {5, 
  140734568085900, 3, 140218083851975, 3, 140734568080586, 6, 
140218083851979, 2, 140734568080606, 
  2, 140218083842978, 1, 140218083851975, 3, 140734568080580}}, 
sa_flags = 12, 
  sa_restorer = 0x7f8711143ecb}
sigs = {__val = {32, 0 repeats 15 times}}
#2  0x7f871103c39e in __libc_message (do_abort=2, 
fmt=0x7f8711146028 *** glibc detected *** %s: %s: 0x%s ***\n)
at ../sysdeps/unix/sysv/linux/libc_fatal.c:201
ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 
0x7fff51f02e40, 
reg_save_area = 0x7fff51f02d50}}
ap_copy = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 
0x7fff51f02e40, 
reg_save_area = 0x7fff51f02d50}}
fd = 7
on_2 = optimised out
list = optimised out
nlist = optimised out
cp = optimised out
written = optimised out
#3  0x7f8711046b96 in malloc_printerr (action=3, str=0x7f8711146138 double 
free or corruption (!prev), 
ptr=optimised out) at malloc.c:5007
buf = 01a413d0
cp = optimised out
#4  0x7f8711036815 in _IO_new_fclose (fp=0x1a413d0) at iofclose.c:88
status = 0
#5  0x006c42e3 in do_fclose_cleanup (arg=0x1a413d0) at 
/build/buildd/gdb-7.5/gdb/utils.c:234
file = 0x1a413d0
#6  0x005583b0 in do_my_cleanups (pmy_chain=0xbeca50 cleanup_chain, 
old_chain=0x83bea0 sentinel_cleanup) at 
/build/buildd/gdb-7.5/gdb/cleanups.c:155
ptr = 0x1a36d40
#7  0x0055841d in do_cleanups (old_chain=0x83bea0 sentinel_cleanup)
at /build/buildd/gdb-7.5/gdb/cleanups.c:177
No locals.
#8  0x004d0d05 in source_script_with_search (file=0x1a3a140 
/home/dg/.gdbinit, from_tty=-1, 
search_path=0) at /build/buildd/gdb-7.5/gdb/cli/cli-cmds.c:621
---Type return to continue, or q return to quit---
statbuf = {st_dev = 2065, st_ino = 1865834, st_nlink = 1, st_mode = 
33204, st_uid = 1000, 
  st_gid = 1000, __pad0 = 0, st_rdev = 0, st_size = 0, st_blksize = 
4096, st_blocks = 0, st_atim = {
tv_sec = 1353763933, tv_nsec = 376637381}, st_mtim = {tv_sec = 
1353763932, tv_nsec = 668637382}, 
  st_ctim = {tv_sec = 1353763932, tv_nsec = 668637382}, __unused = {0, 
0, 0}}
fd = 7
stream = 0x1a413d0
full_path = 0x1989b60 /home/dg/.gdbinit
old_cleanups = 0x83bea0 sentinel_cleanup
#9  0x004d0d70 in source_script (file=0x1a3a140 /home/dg/.gdbinit, 
from_tty=-1)
at /build/buildd/gdb-7.5/gdb/cli/cli-cmds.c:642
No locals.
#10 0x005c9cd7 in catch_command_errors (command=0x4d0d4b 
source_script, 
arg=0x1a3a140 /home/dg/.gdbinit, from_tty=-1, mask=6) at 
/build/buildd/gdb-7.5/gdb/exceptions.c:573
e = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
#11 0x005cc6e2 in captured_main (data=0x7fff51f03210) at 
/build/buildd/gdb-7.5/gdb/main.c:849
context = 0x7fff51f03210
argc = 1
argv = 0x7fff51f03318
quiet = 0
set_args = 0
symarg = 0x0
execarg = 0x0
pidarg = 0x0
corearg = 0x0
pid_or_core_arg = 0x0
cdarg = 0x0
ttyarg = 0x0
print_help = 0
print_version = 0
cmdarg_vec = 0x0
cmdarg_p = 0x0
dirarg = 0x18a3040
dirsize = 1
ndir = 0
system_gdbinit = 0x19e4d30 /etc/gdb/gdbinit
home_gdbinit = 0x1a3a140 /home/dg/.gdbinit
local_gdbinit = 0x0
i = 1374695696
save_auto_load = 0
objfile = 0x7fff51f03310
pre_stat_chain = 0x83bea0 sentinel_cleanup
#12 0x005c9c03 in catch_errors (func=0x5cba79 captured_main, 
func_args=0x7fff51f03210, 
errstring=0x8574d1 , mask=6) at /build/buildd/gdb-7.5/gdb/exceptions.c:546
val = 0
exception = {reason = 0, error = GDB_NO_ERROR, message = 0x0}
saved_uiout = 0xbf04a0 def_uiout
#13 0x005ccc5c in gdb_main (args=0x7fff51f03210) at 
/build/buildd/gdb-7.5/gdb/main.c:1008
No locals.
#14 0x0044e5aa in main (argc=1, argv=0x7fff51f03318) at 
/build/buildd/gdb-7.5/gdb/gdb.c:34
args = {argc = 1, argv = 0x7fff51f03318, use_windows = 0, interpreter_p 
= 0x7ef184 console}

-- 
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 

[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-11-24 Thread Dave Gilbert
This looks to me as a bug in a debian specific patch; see 
debian/patches/gdbinit-ownership.patch
+ warning (not using untrusted file \%s\, file);
+ fclose (stream);
+ do_cleanups (old_cleanups);
+ return;

As far as I can tell from the weird cleanup system, the do_cleanups is 
fclose'ing stream as well, and that's why it fails.
commenting out the fclose(stream) there makes it work for me, and the fd is 
closed according to /proc/*/fd


** Changed in: gdb (Ubuntu)
   Status: Confirmed = Triaged

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-11-24 Thread Dave Gilbert
** Bug watch added: Debian Bug tracker #694256
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694256

** Also affects: gdb (Debian) via
   http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=694256
   Importance: Unknown
   Status: Unknown

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-11-22 Thread Launchpad Bug Tracker
Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: gdb (Ubuntu)
   Status: New = Confirmed

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1069897] Re: gdb crashes on startup if run as root via sudo and ~/.gdbinit exists

2012-10-25 Thread Brian Murray
** Tags added: quantal

** Changed in: gdb (Ubuntu)
   Importance: Undecided = Medium

-- 
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
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs