Bug 1263834 - -fsanitize=address does not work
Summary: -fsanitize=address does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: llvm
Version: 24
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Adam Jackson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1278914 1309329 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-16 20:25 UTC by Sami Farin
Modified: 2017-03-16 23:43 UTC (History)
21 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-03-16 23:43:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sami Farin 2015-09-16 20:25:49 UTC
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 10:24:13 UTC
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 11:00:01 UTC
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 15:38:23 UTC
Thanks Sami, apparently copying libclang_rt.asan-x86_64.a from that archive was enough.

Comment 4 Laurent Rineau 2016-01-27 13:29:08 UTC
*** Bug 1278914 has been marked as a duplicate of this bug. ***

Comment 5 Daniel Veillard 2016-02-11 16:40:51 UTC
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 05:37:40 UTC
*** Bug 1309329 has been marked as a duplicate of this bug. ***

Comment 7 Stephan Bergmann 2016-07-05 11:16:04 UTC
(In F24, the relevant archives are apparently in a compiler-rt rpm now.)

Comment 8 bztdlinux 2016-11-09 23:36:31 UTC
I hit this on F24. Shouldn't compiler-rt be a dependency of clang?

Comment 9 Fedora End Of Life 2016-11-24 12:31:33 UTC
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 09:40:23 UTC
(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 23:43:46 UTC
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.