GNU bug report logs - #64129
[PATCH] gnu: clang-runtime-15: Fix address sanitizer support

Previous Next

Package: guix-patches;

Reported by: Tobias Kortkamp <tobias.kortkamp <at> gmail.com>

Date: Sat, 17 Jun 2023 13:33:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Philippe Virouleau <philippe.virouleau <at> inria.fr>
To: 64129 <at> debbugs.gnu.org
Subject: [bug#64129] [PATCH] gnu: clang-runtime-15: Fix address sanitizer support
Date: Mon, 10 Jul 2023 14:37:38 +0200 (CEST)
[Message part 1 (text/plain, inline)]
Hi Tobias and all, 

I can confirm instrumented builds are also broken with [ mailto:clang-runtime <at> 15 | clang-runtime <at> 15 ] at the moment(using `clang -fprofile-instr-generate`) because `libclang_rt.profile-x86_64.a` doesn't exist. 
In my opinion your suggested patch is just fine, as I believe we have to keep static files for this package: 
- clang's driver actually explicitly link static files for some of them: [ https://github.com/llvm/llvm-project/blob/4c6f95be29c6ce0f89663a5103c58ee63d76cda3/clang/lib/Driver/ToolChains/CommonArgs.cpp#L1070-L1072 | https://github.com/llvm/llvm-project/blob/4c6f95be29c6ce0f89663a5103c58ee63d76cda3/clang/lib/Driver/ToolChains/CommonArgs.cpp#L1070-L1072 ] 
- I couldn't find a recent explanation for this and all compiler-rt components, but this forum post explains why there are both static libs and shared libs: [ https://discourse.llvm.org/t/asan-static-linking-on-android/29223/3 | https://discourse.llvm.org/t/asan-static-linking-on-android/29223/3 ] (basically they use static linking to intercept only calls from the main binary and not from dependent libraries, thanks to a glibc load order behavior, but the trick doesn't work on android and other platforms so they LD_PRELOAD a shared lib). 

By a quick glance at the installed components I couldn't find any static library that we can remove (most of them only exist as a static library, and the others are sanitizers). 

Regards, 
Philippe 
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 313 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.