gopalshankar / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
0 stars 0 forks source link

binary size bloat due to repetition of the file name in the description of the globals. #168

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
asan creates a string constant describing every global variable.
right now each such constant contains a file name, which could be rather long.
We probably need to create a string for every file name just once. 

repro: 

==> file_with_very_looooooooooooooooooooooooooooooong_name.cc <==
int a, b, c, d, e, f, g, h;

% clang -c -fsanitize=address -O1 
file_with_very_looooooooooooooooooooooooooooooong_name.cc
% strings ./file_with_very_looooooooooooooooooooooooooooooong_name.o
a (file_with_very_looooooooooooooooooooooooooooooong_name.cc)
b (file_with_very_looooooooooooooooooooooooooooooong_name.cc)
c (file_with_very_looooooooooooooooooooooooooooooong_name.cc)
d (file_with_very_looooooooooooooooooooooooooooooong_name.cc)
e (file_with_very_looooooooooooooooooooooooooooooong_name.cc)
f (file_with_very_looooooooooooooooooooooooooooooong_name.cc)
g (file_with_very_looooooooooooooooooooooooooooooong_name.cc)
h (file_with_very_looooooooooooooooooooooooooooooong_name.cc)

Original issue reported on code.google.com by konstant...@gmail.com on 15 Mar 2013 at 11:11

GoogleCodeExporter commented 9 years ago
http://llvm.org/viewvc/llvm-project?rev=177253&view=rev and
http://llvm.org/viewvc/llvm-project?rev=177254&view=rev
should have fixed this. 
I observed 3% binary size decrease on on huge binary. 

Original comment by konstant...@gmail.com on 18 Mar 2013 at 8:09