Bug ID: 41501
Summary: scan-build exits successfully if subordinate command
is killed by a signal
Component: Static Analyzer
CC: dcough...@apple.com, email@example.com
If the build command is killed by a signal, scan-build ignores this fact
and returns everythign is A-OK. For example, to demonstrate:
% scan-build /bin/sh -c 'kill -TERM $$; sleep 5; exit 42' ; echo status is $?
scan-build: No bugs found.
exit status is 0
Or alternately since perl ignores SIGINT during the execution of a system()
function, one can typically just ctrl+c the build and this will kill just
the child process. Then scan-build will (depending on timing) exit
successfully with a status of 0.
This appears to be because whenever scan-build script calls perl's system
function it calls it like this:
return (system(@$Args) >> 8);
which is explicitly discarding the status of the child process in cases where
it dies due to a signal...
Since the build has failed due to the compiler being killed, I had expected
scan-build to at least return some indication of this failure...
You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list