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