Bug 13141 (clang-ASAN)

Summary: compiler-rt (runtime component library for address, integer,⦠sanitizer) missing from clang
Product: Mageia Reporter: Johnny Accot <accot>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: lohmaier+mageia, marja11, shlomif, thierry.vignaud, tmb
Version: CauldronKeywords: Triaged
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: llvm-3.4-1.mga5.src.rpm CVE:
Status comment:
Bug Depends on: 13813    
Bug Blocks:    

Description Johnny Accot 2014-04-03 13:26:01 CEST
Description of problem:
clangc provides an integer sanitizer, which is activated by the "-fsanitize=integer" flag [1].
But compiling with that flag gives an error when linking:

/usr/bin/ld: cannot find /usr/bin/../lib/clang/3.4/lib/linux/libclang_rt.san-x86_64.a: No such file or directory

My guess is that the library was left out when the packages were built.

[1] http://llvm.org/releases/3.4/tools/clang/docs/UsersManual.html#controlling-code-generation

Version-Release number of selected component (if applicable):
clang/llvm 3.4

How reproducible:
Always

Steps to Reproduce:
1. echo "int main(){return 1;}" > sanitizer.c
2. clang -fsanitize=integer sanitizer.c
3.

Reproducible: 

Steps to Reproduce:
Comment 1 Johnny Accot 2014-04-03 13:29:12 CEST
(Note that:

$ urpmf libclang_rt

returns no result.)
Manuel Hiebel 2014-06-12 01:36:09 CEST

CC: (none) => shlomif, thierry.vignaud, tmb
Keywords: (none) => Triaged

Comment 2 Christian Lohmaier 2014-06-16 17:02:21 CEST
also applies to mga4 of course.

llvm package doesn't include the compiler-rt project tarball that provides the functionality for the address sanitizer, integer 


Fix is rather simple:

+ Source2: http://llvm.org/releases/%{version}/compiler-rt-%{version}.tar.gz
[...]
- %setup -q %{?with_clang:-a1}
+ %setup -q %{?with_clang:-a1 -a2}
[...]
  %if %{with clang} 
  mv clang-%{version} tools/clang 
+ mv compiler-rt-%{version} projects/compiler-rt 
  cd tools/clang 


Or in other words: Just add source for compiler-rt tarball, extract and put into projects/compiler-rt
No extra configuring is necessary.

CC: (none) => lohmaier+mageia
Summary: Missing library for integer sanitizer in clang 3.4 => compiler-rt (runtime component library for address, integer,⦠sanitizer) missing from clang
Alias: (none) => clang-ASAN

Comment 3 Thomas Backlund 2014-06-16 21:12:27 CEST
Fixed in cauldron in llvm-3.4.2-1.mga5 currently building

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 4 Marja Van Waes 2014-07-28 08:19:24 CEST
(In reply to Christian Lohmaier from comment #2)
> also applies to mga4 of course.
> 

Fix now available for Mga4, too, the llvm/clang packages are on your mirror in updates_testing or should land there soon.

Please test and report back in bug 13813

CC: (none) => marja11

Thomas Backlund 2014-07-28 11:37:15 CEST

Depends on: (none) => 13813