[llvm-bugs] [Bug 35349] New: alpha.unix.Chroot is unusable with chroot() error checking
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Nov 17 10:09:20 PST 2017
https://bugs.llvm.org/show_bug.cgi?id=35349
Bug ID: 35349
Summary: alpha.unix.Chroot is unusable with chroot() error
checking
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: tss at iki.fi
CC: llvm-bugs at lists.llvm.org
Created attachment 19444
--> https://bugs.llvm.org/attachment.cgi?id=19444&action=edit
test program
It seems to be impossible to check for chroot() return value and handle it,
without alpha.unix.Chroot complaining: warning: No call of chdir("/")
immediately after chroot
I even attempted to use chdir("/") in the error handling code path just after
saving errno, but even that fails. See attached test.c program.
scan-build -enable-checker alpha.unix gcc test.c -o test
test2.c:7:20: warning: No call of chdir("/") immediately after chroot
int orig_errno = errno;
^~~~~
I guess I could just trust that chdir("/") doesn't change the errno, but that
seems a bit fragile.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171117/cbee5215/attachment.html>
More information about the llvm-bugs
mailing list