Bug 1278914
| Summary: | clang -fsanitize=undefined fails due to missing libclang_rt.ubsan_standalone-x86_64.a file | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Stefan Hajnoczi <stefanha> |
| Component: | llvm | Assignee: | Adam Jackson <ajax> |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 23 | CC: | ajax, bos, dmalcolm, jsnow, jv+fedora, laurent.rineau__fedora, murrayc, petersen, scottt.tw |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-01-27 13:29:08 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This is a regression, it worked fine in F22. Same with the other sanitizers. $ clang -o /dev/null -fsanitize=memory main.c /usr/bin/ld: cannot find /usr/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.msan-x86_64.a: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) zsh: exit 1 clang -o /dev/null -fsanitize=memory main.c zsh: exit 1 $ clang -o /dev/null -fsanitize=address main.c /usr/bin/ld: cannot find /usr/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) zsh: exit 1 clang -o /dev/null -fsanitize=address main.c zsh: exit 1 $ clang -o /dev/null -fsanitize=thread main.c /usr/bin/ld: cannot find /usr/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.tsan-x86_64.a: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) zsh: exit 1 clang -o /dev/null -fsanitize=thread main.c zsh: exit 1 Might be related to upstream issues pointed out by that ArchLinux bug report: https://bugs.archlinux.org/task/46392 *** This bug has been marked as a duplicate of bug 1263834 *** |
Description of problem: clang -fsanitize=undefined results in a linker error because the missing runtime for the sanitizer is missing from the clang package. Version-Release number of selected component (if applicable): clang-libs-3.7.0-1.fc23.x86_64 clang-3.7.0-1.fc23.x86_64 How reproducible: Deterministic Steps to Reproduce: 1. cat >a.c int main(int argc, char* argv) { return 0; } ^D 2. clang -fsanitize=undefined -o a a.c Actual results: /usr/bin/ld: cannot find /usr/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.ubsan_standalone-x86_64.a: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) Expected results: Successful compilation. Additional info: I couldn't find libclang_rt.ubsan_standalone-x86_64.a using dnf whatprovides, so I guess it's simply not built/packaged yet.