<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Since r177724: AddressSanitizer CHECK failed: llvm/projects/compiler-rt/lib/asan/asan_fake_stack.cc:46 "((alloc_size > (1UL << (log-1)))) != (0)" (0x0, 0x0)"
href="http://llvm.org/bugs/show_bug.cgi?id=15672">15672</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Since r177724: AddressSanitizer CHECK failed: llvm/projects/compiler-rt/lib/asan/asan_fake_stack.cc:46 "((alloc_size > (1UL << (log-1)))) != (0)" (0x0, 0x0)
</td>
</tr>
<tr>
<th>Product</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>emikulic@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=10287" name="attach_10287" title="Test case that triggers AddressSanitizer CHECK-fail">attachment 10287</a> <a href="attachment.cgi?id=10287&action=edit" title="Test case that triggers AddressSanitizer CHECK-fail">[details]</a></span>
Test case that triggers AddressSanitizer CHECK-fail
Working:
$ clang++ -v
clang version 3.3 (trunk 177722)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang++ -g -fsanitize=address-full test2.cpp && ./a.out; echo $?
0
Not working:
$ clang++ -v
clang version 3.3 (trunk 177724)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang++ -g -fsanitize=address-full test2.cpp
$ ASAN_OPTIONS=abort_on_error=1 gdb a.out
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>...
Reading symbols from /tmp/a.out...done.
(gdb) run
Starting program: /tmp/a.out
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
alloc_size 1 log 0
==20275==AddressSanitizer CHECK failed:
/home/emil/llvm/llvm/projects/compiler-rt/lib/asan/asan_fake_stack.cc:46
"((alloc_size > (1UL << (log-1)))) != (0)" (0x0, 0x0)
#0 0x41ffcf (/tmp/a.out+0x41ffcf)
#1 0x4217d1 (/tmp/a.out+0x4217d1)
#2 0x41377b (/tmp/a.out+0x41377b)
#3 0x41339a (/tmp/a.out+0x41339a)
#4 0x4132f2 (/tmp/a.out+0x4132f2)
#5 0x429395 (/tmp/a.out+0x429395)
#6 0x428f09 (/tmp/a.out+0x428f09)
#7 0x428b4d (/tmp/a.out+0x428b4d)
#8 0x7ffff6eb2eac (/lib/x86_64-linux-gnu/libc-2.13.so+0x1eeac)
#9 0x4289dc (/tmp/a.out+0x4289dc)
Program received signal SIGABRT, Aborted.
0x00007ffff6ec6475 in *__GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 0x00007ffff6ec6475 in *__GI_raise (sig=<optimized out>)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff6ec96f0 in *__GI_abort () at abort.c:92
#2 0x00000000004249f6 in __sanitizer::Abort() ()
#3 0x000000000041ff98 in __asan::AsanDie() ()
#4 0x000000000042177f in __sanitizer::Die() ()
#5 0x000000000041ffff in __asan::AsanCheckFailed(char const*, int, char
const*, unsigned long long, unsigned long long) ()
#6 0x00000000004217d2 in __sanitizer::CheckFailed(char const*, int, char
const*, unsigned long long, unsigned long long) ()
#7 0x000000000041377c in __asan::FakeStack::ComputeSizeClass(unsigned long) ()
#8 0x000000000041339b in
__asan::FakeStack::DeallocateFrame(__asan::FakeFrame*) ()
#9 0x00000000004132f3 in __asan::FakeStack::AllocateStack(unsigned long,
unsigned long) ()
#10 0x0000000000429396 in c::c (
this=<error reading variable: DWARF-2 expression error: DW_OP_reg
operations must be used either alone or in conjunction with DW_OP_piece or
DW_OP_bit_piece.>) at test2.cpp:27
#11 0x0000000000428f0a in a::b (this=0x7ffff438e020) at test2.cpp:33
#12 0x0000000000428b4e in main () at test2.cpp:38
(gdb)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>