https://sourceware.org/bugzilla/show_bug.cgi?id=15545
Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Status|WAITING |RESOLVED --- Comment #8 from Tom Tromey <tromey at sourceware dot org> --- > So if the bfd library closes and then reopens this file, it > is not going to have the O_CLOEXEC flag set. BFD always set cloexec from _bfd_real_fopen -> close_on_exec > Additionally there is a possible disconnect in the paths to > the file. Suppose for example that the test code did this: > > fd = open (argv[1], O_RDONLY | O_CLOEXEC, 0); > abfd = bfd_fopen ("/usr/bin/ld", NULL, "r", fd); > > This is obviously a bug in the test code, but it would only > be exposed if the close/reopen sequence happened. Maybe > bdf_fopen should check for this case (if it is possible). Yeah, I guess I would describe that as a client bug. > > Also maybe gdb is safe here anyway because I see now > > that it explicitly calls bfd_set_cacheable in various spots. > > So - do you want to close this PR for now and see if a real problem > ever turns up in the future ? Yeah. -- You are receiving this mail because: You are on the CC list for the bug.