Date: Tue, 18 Dec 2012 01:14:01 -0500 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: LLVM testsuite, close-stderr.ll hangs On Tue, Dec 18, 2012 at 09:55:54AM +0400, ojab wrote: > On 17.12.2012 21:22, Rich Felker wrote: > >On Mon, Dec 17, 2012 at 11:58:29AM -0500, Rich Felker wrote: > >To track this down, you could run under gdb and just interrupt the > >program and look at a backtrace once it hangs. This should make it > >clear whether exit was called recursively. > > Looks something like that (gdb output in the attached file, `bt` > while `opt` hangs in the bottom): I've set `break exit` and stepped > till it hangs, first exit() happens in command line parsing (https://github.com/llvm-mirror/llvm/blob/master/lib/Support/CommandLine.cpp#L846), > which calls report_fatal_error("IO failure on output stream.");, > which calls exit itself. > > Looks like (note that I'm barely know C/C++) something wrong in > ostream destruction: after changing ifdef to ifndef @ > https://github.com/llvm-mirror/llvm/blob/master/lib/Support/raw_ostream.cpp#L501 > all works as it should: I suspect there may be similar problems in more places than just this. It definitely calls for a bug report. Calling exit from global dtors is invalid (invokes undefined behavior). Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.