This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/55354] [asan] by default, the asan run-time should be linked statically, not dynamically
- From: "konstantin.s.serebryany at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Nov 2012 04:13:23 +0000
- Subject: [Bug other/55354] [asan] by default, the asan run-time should be linked statically, not dynamically
- Auto-submitted: auto-generated
- References: <bug-55354-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55354
--- Comment #13 from Konstantin Serebryany <konstantin.s.serebryany at gmail dot com> 2012-11-19 04:13:23 UTC ---
>> of course everything would need to be done only given appropriate benchmarks of real-world programs.
We have a synthetic benchmark which perfectly reflects the only major hot spot
in tsan: the set of functions __tsan_{read,write}{1,2,4,8} that are called on
every memory access.
When building libtsan as a shared library (for which I had to hack our assembly
blobs a bit) we get two sources of slowdown:
1. __tsan_read8 and friends are called through PLT
2. __tsan_read8 and friends use one extra load to get to TLS
The result is > 10% slowdown.