Bug#844210: scan-build: wrong permissions on error output

Richard Kettlewell rjk at terraraq.uk
Sun Nov 13 12:41:51 UTC 2016


Package: clang-3.9
Version: 1:3.9-5

scan-build leaves compiler error output mode 600 instead of honoring
the umask:

$ ls -l /tmp/scan-build-2016-11-13-123320-5183-1/failures
total 756
-rw-r--r-- 1 richard richard 763039 Nov 13 12:33 clang_other_error_D_5Pns.ii
-rw-r--r-- 1 richard richard   2889 Nov 13 12:33
clang_other_error_D_5Pns.ii.info.txt
-rw------- 1 richard richard   2181 Nov 13 12:33
clang_other_error_D_5Pns.ii.stderr.txt

In my automated build infrastructure, this is a problem, because I
expose the output via a web server, which can't serve the stderr.txt  file.

I believe the root cause is this part of ccc-analyzer:

  # Save STDOUT and STDERR of clang to a temporary file and reroute
  # all clang output to ccc-analyzer's STDERR.
  # We save the output file in the 'crashes' directory if clang encounters
  # any problems with the file.
  my ($ofh, $ofile) = tempfile("clang_output_XXXXXX", DIR => $HtmlDir);

tempfile() defaults to mode 0600 and AFAICS doesn't have any convenient
way to change this.

ttfn/rjk



More information about the Pkg-llvm-team mailing list