Bug 1278914 - clang -fsanitize=undefined fails due to missing libclang_rt.ubsan_standalone-x86_64.a file
clang -fsanitize=undefined fails due to missing libclang_rt.ubsan_standalone-...
Status: CLOSED DUPLICATE of bug 1263834
Product: Fedora
Classification: Fedora
Component: llvm (Show other bugs)
23
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Adam Jackson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-06 13:12 EST by Stefan Hajnoczi
Modified: 2016-01-27 08:29 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-27 08:29:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan Hajnoczi 2015-11-06 13:12:46 EST
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.
Comment 1 Stefan Hajnoczi 2015-11-06 13:13:31 EST
This is a regression, it worked fine in F22.
Comment 2 Laurent Rineau 2016-01-27 08:26:13 EST
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
Comment 3 Laurent Rineau 2016-01-27 08:26:55 EST
Might be related to upstream issues pointed out by that ArchLinux bug report:
https://bugs.archlinux.org/task/46392
Comment 4 Laurent Rineau 2016-01-27 08:29:08 EST

*** This bug has been marked as a duplicate of bug 1263834 ***

Note You need to log in before you can comment on or make changes to this bug.