[LLVMbugs] [Bug 15672] 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)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Apr 4 10:49:09 PDT 2013


            Bug ID: 15672
           Summary: Since r177724: AddressSanitizer CHECK failed:
                    46 "((alloc_size > (1UL << (log-1)))) != (0)" (0x0,
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: compiler-rt
          Assignee: unassignedbugs at nondot.org
          Reporter: emikulic at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10287
  --> http://llvm.org/bugs/attachment.cgi?id=10287&action=edit
Test case that triggers AddressSanitizer CHECK-fail


$ 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 $?

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 <http://gnu.org/licenses/gpl.html>
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:
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:
"((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
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

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130404/fcd0869b/attachment.html>

More information about the llvm-bugs mailing list