<div dir="ltr">Still seeing this failure. Though for me, the symbol seems to appear for both -c and non-c:<br><br><div><font face="monospace, monospace">$ clang projects/compiler-rt/test/asan/TestCases/no_asan_gen_globals.c  -c -m32  -fsanitize=address -o x.o && nm x.o | grep __asan_gen</font></div><div><font face="monospace, monospace">00000000 r .L__asan_gen_</font></div><div><font face="monospace, monospace">$ clang projects/compiler-rt/test/asan/TestCases/no_asan_gen_globals.c  -c -m64  -fsanitize=address -o x.o && nm x.o | grep __asan_gen</font></div><div><font face="monospace, monospace">$ clang projects/compiler-rt/test/asan/TestCases/no_asan_gen_globals.c   -fsanitize=address -o x.o && nm x.o | grep __asan_gen</font></div><div><font face="monospace, monospace">$ clang projects/compiler-rt/test/asan/TestCases/no_asan_gen_globals.c  -m32 -fsanitize=address -o x.o && nm x.o | grep __asan_gen</font></div><div><font face="monospace, monospace">08126ad2 r .L__asan_gen_</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 18, 2014 at 4:46 AM, Alexander Potapenko <span dir="ltr"><<a href="mailto:glider@google.com" target="_blank">glider@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">At the same time the result of running `clang ../no_asan_gen_globals.c -fsanitize=address` (without -c) doesn't contain __asan_gen for both -m32 and -m64</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 18, 2014 at 1:20 PM, Alexander Potapenko <span dir="ltr"><<a href="mailto:glider@google.com" target="_blank">glider@google.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Looks like the behavior is different for 32 and 64 bits:<div><br></div><div><div>$ clang ../no_asan_gen_globals.c -c -fsanitize=address -m64 ; nm no_asan_gen_globals.o | grep __asan_gen</div></div><div># nothing here</div><div>$ clang ../no_asan_gen_globals.c -c -fsanitize=address -m32 ; nm no_asan_gen_globals.o | grep __asan_gen</div><div>00000000 r .L__asan_gen_</div><div><br></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 18, 2014 at 1:38 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ping. This is still showing up for me (& one of the reasons (the main one being increased build times) I keep removing my projects/compiler-rt from time to time).</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 9, 2014 at 9:20 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">​<br><div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://docs.google.com/file/d/0B0jpkch3iC_7WlYwemNsMzVuWmM/edit?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none;width:100%" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_text_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">no_asan_gen_globals.nm.txt</span></a></div>​​<br><div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://docs.google.com/file/d/0B0jpkch3iC_7QWdDbzFhbW9jVnM/edit?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none;width:100%" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">no_asan_gen_globals.s</span></a></div>​​<br><div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1"><a href="https://docs.google.com/file/d/0B0jpkch3iC_7eHZkeGtJX1FkSzQ/edit?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none;width:100%" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">no_asan_gen_globals.ll</span></a></div>​<br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Mon, Sep 8, 2014 at 12:45 AM, Alexander Potapenko <span dir="ltr"><<a href="mailto:glider@google.com" target="_blank">glider@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I wonder why __asan_gen_ is prefixed with "L". I'd think you were<br>
targeting Darwin, but looking at the command line it isn't so.<br>
The test passes for me on Ubuntu 12.04.<br>
Do you have local changes in your tree? </blockquote><div><br></div></span><div>I don't think so.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Can you please post the IR and the assembly for this test?<br></blockquote></span><div><br>Attached the assembly, IR, and the output of 'nm'. Let me know if I can provide more information.<br> </div><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div><br>
On Mon, Sep 8, 2014 at 8:37 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br>
> This test is failing for me on Linux (Ubuntu TLS 12.04 I believe) as<br>
> follows:<br>
><br>
> /home/blaikie/dev/llvm/build/clang/debug/split/notypes/nostandalone/./bin/clang<br>
> -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer<br>
> -fno-optimize-sibling-calls -gline-tables-only -m32<br>
> /mnt/fast/dev/llvm/src/projects/compiler-rt/test/asan/TestCases/no_asan_gen_globals.c<br>
> -o<br>
> /mnt/fast/dev/llvm/build/clang/debug/split/notypes/nostandalone/projects/compiler-rt/test/asan/32bitConfig/TestCases/Output/no_asan_gen_globals.c.tmp.exe<br>
> nm<br>
> /mnt/fast/dev/llvm/build/clang/debug/split/notypes/nostandalone/projects/compiler-rt/test/asan/32bitConfig/TestCases/Output/no_asan_gen_globals.c.tmp.exe<br>
> | FileCheck<br>
> /mnt/fast/dev/llvm/src/projects/compiler-rt/test/asan/TestCases/no_asan_gen_globals.c<br>
> --<br>
> Exit Code: 1<br>
><br>
> Command Output (stderr):<br>
> --<br>
> <stdin>:2011:14: error: CHECK-NOT: string occurred!<br>
> 080fb9de r .L__asan_gen_<br>
>              ^<br>
> /mnt/fast/dev/llvm/src/projects/compiler-rt/test/asan/TestCases/no_asan_gen_globals.c:11:15:<br>
> note: CHECK-NOT: pattern specified here<br>
> // CHECK-NOT: __asan_gen_<br>
>               ^<br>
><br>
><br>
> Anything ideas with what the issue is here? Something I should fix?<br>
> Legitimate bug?<br>
><br>
><br>
> On Wed, Dec 25, 2013 at 6:22 AM, Alexander Potapenko <<a href="mailto:glider@google.com" target="_blank">glider@google.com</a>><br>
> wrote:<br>
>><br>
>> Author: glider<br>
>> Date: Wed Dec 25 08:22:15 2013<br>
>> New Revision: 198017<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=198017&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=198017&view=rev</a><br>
>> Log:<br>
>> [ASan] Make sure none of the __asan_gen_ global strings end up in the<br>
>> symbol table, add a test.<br>
>><br>
>> This should fix <a href="http://llvm.org/bugs/show_bug.cgi?id=17976" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=17976</a><br>
>> Another test checking for the global variables' locations and prefixes on<br>
>> Darwin will be committed separately.<br>
>><br>
>><br>
>> Added:<br>
>>     compiler-rt/trunk/lib/asan/lit_tests/TestCases/no_asan_gen_globals.c<br>
>> (with props)<br>
>><br>
>> Added:<br>
>> compiler-rt/trunk/lib/asan/lit_tests/TestCases/no_asan_gen_globals.c<br>
>> URL:<br>
>> <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/no_asan_gen_globals.c?rev=198017&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/no_asan_gen_globals.c?rev=198017&view=auto</a><br>
>><br>
>> ==============================================================================<br>
>> --- compiler-rt/trunk/lib/asan/lit_tests/TestCases/no_asan_gen_globals.c<br>
>> (added)<br>
>> +++ compiler-rt/trunk/lib/asan/lit_tests/TestCases/no_asan_gen_globals.c<br>
>> Wed Dec 25 08:22:15 2013<br>
>> @@ -0,0 +1,7 @@<br>
>> +// Make sure __asan_gen_* strings do not end up in the symbol table.<br>
>> +<br>
>> +// RUN: %clang_asan %s -o %t.exe<br>
>> +// RUN: nm %t.exe | grep __asan_gen_ || exit 0<br>
>> +<br>
>> +int x, y, z;<br>
>> +int main() { return 0; }<br>
>><br>
>> Propchange:<br>
>> compiler-rt/trunk/lib/asan/lit_tests/TestCases/no_asan_gen_globals.c<br>
>><br>
>> ------------------------------------------------------------------------------<br>
>>     svn:eol-style = LF<br>
>><br>
>><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
><br>
><br>
<br>
<br>
<br>
</div></div><span><font color="#888888">--<br>
Alexander Potapenko<br>
Software Engineer<br>
Google Moscow<br>
</font></span></blockquote></div></div></div><br></div></div>
</blockquote></div></div>
</div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div>Alexander Potapenko<br>Software Engineer<br>Google Moscow<br></div>
</div>
</div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div>Alexander Potapenko<br>Software Engineer<br>Google Moscow<br></div>
</div>
</div></div></blockquote></div><br></div>