Bug 1263834 - -fsanitize=address does not work
-fsanitize=address does not work
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: llvm (Show other bugs)
24
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Adam Jackson
Fedora Extras Quality Assurance
:
: 1278914 1309329 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-16 16:25 EDT by Sami Farin
Modified: 2017-03-16 19:43 EDT (History)
21 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-16 19:43:46 EDT
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 Sami Farin 2015-09-16 16:25:49 EDT
Description of problem:
clang -fsanitize=address some.c
/usr/bin/ld: error: cannot open /usr/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory

Version-Release number of selected component (if applicable):
3.7.0-1.fc24

How reproducible:
100%

Steps to Reproduce:
1. clang -fsanitize=address
2.
3.

Actual results:
No fun.

Expected results:


Additional info:
Comment 1 Jan Včelák 2015-10-01 06:24:13 EDT
I can confirm this. The static library with ASAN disappeared in 3.7.

Unfortunately, this is expected according to the upstream:
https://llvm.org/bugs/show_bug.cgi?id=22757

We will have to switch the build system from autotools to cmake. This will be a lot of work. It was pretty broken the last time I tried (in 3.3 or something).

The ASAN support is pretty important for me. But I'm not sure if I'll have time to fix this any time soon.

Jan
Comment 2 Sami Farin 2015-10-01 07:00:01 EDT
before opening this bug report, I downloaded
http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-x86_64-fedora22.tar.xz
(and .sig) and copied the missing files to
/usr/lib/clang/3.7.0/lib/linux
and ASAN worked OK.  

...in case someone needs ASAN ASAP.
Comment 3 Leszek Matok 2016-01-24 10:38:23 EST
Thanks Sami, apparently copying libclang_rt.asan-x86_64.a from that archive was enough.
Comment 4 Laurent Rineau 2016-01-27 08:29:08 EST
*** Bug 1278914 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Veillard 2016-02-11 11:40:51 EST
I confirm on comment #3, unpack the archive and

cp ./lib/clang/3.7.0/lib/linux/libclang_rt.asan-x86_64.a /usr/lib/clang/3.7.0/lib/linux/

is sufficient to fix the issue until getting a package update,

Daniel
Comment 6 Sitsofe Wheeler 2016-03-01 00:37:40 EST
*** Bug 1309329 has been marked as a duplicate of this bug. ***
Comment 7 Stephan Bergmann 2016-07-05 07:16:04 EDT
(In F24, the relevant archives are apparently in a compiler-rt rpm now.)
Comment 8 bztdlinux 2016-11-09 18:36:31 EST
I hit this on F24. Shouldn't compiler-rt be a dependency of clang?
Comment 9 Fedora End Of Life 2016-11-24 07:31:33 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 10 Thomas Moschny 2016-11-25 04:40:23 EST
(In reply to Stephan Bergmann from comment #7)
> (In F24, the relevant archives are apparently in a compiler-rt rpm now.)

While true, is it documented somewhere? Or should compiler-rt be a dependency of clang, as per comment #8?
Comment 11 Tom Stellard 2017-03-16 19:43:46 EDT
This is working now with clang-3.8.1-1.fc24.

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