[LLVMbugs] [Bug 17867] New: AddressSanitizerFunctionPass assertion due to lifetime intrinsic

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat Nov 9 15:23:49 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=17867

            Bug ID: 17867
           Summary: AddressSanitizerFunctionPass assertion due to lifetime
                    intrinsic
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Transformation Utilities
          Assignee: unassignedbugs at nondot.org
          Reporter: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

echo 'int main() { unsigned char c = 0; return 0; }' |
llvm-commit/Debug+Asserts/bin/clang -x c - -fsanitize=address,use-after-scope

Produces this crash:

clang: AddressSanitizer.cpp:1476: void
{anonymous}::FunctionStackPoisoner::poisonStack(): Assertion `AI' failed.

By the way, I can't seem to reproduce this with just a .bc file and opt, even
with all the hidden flags. Please make sure that this is possible.

0x00007ffff69ec1e5 in __GI_raise (sig=sig at entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff69ec1e5 in __GI_raise (sig=sig at entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff69ef398 in __GI_abort () at abort.c:90
#2  0x00007ffff69e5272 in __assert_fail_base (
    fmt=0x7ffff6b22900 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
    assertion=assertion at entry=0x3ad4c04 "AI", 
    file=file at entry=0x3ad45ca "AddressSanitizer.cpp", line=line at entry=1476, 
    function=function at entry=0x3adb0a0 <(anonymous
namespace)::FunctionStackPoisoner::poisonStack()::__PRETTY_FUNCTION__> "void
{anonymous}::FunctionStackPoisoner::poisonStack()") at assert.c:92
#3  0x00007ffff69e5322 in __GI___assert_fail (assertion=0x3ad4c04 "AI", 
    file=0x3ad45ca "AddressSanitizer.cpp", line=1476, 
    function=0x3adb0a0 <(anonymous
namespace)::FunctionStackPoisoner::poisonStack()::__PRETTY_FUNCTION__> "void
{anonymous}::FunctionStackPoisoner::poisonStack()") at assert.c:101
#4  0x000000000212a6a1 in (anonymous
namespace)::FunctionStackPoisoner::poisonStack (this=0x7fffffffbf60) at
AddressSanitizer.cpp:1476
#5  0x0000000002124b92 in (anonymous
namespace)::FunctionStackPoisoner::runOnFunction (this=0x7fffffffbf60) at
AddressSanitizer.cpp:451
#6  0x0000000002129164 in (anonymous
namespace)::AddressSanitizer::runOnFunction (this=0x53055b0, F=...) at
AddressSanitizer.cpp:1243
#7  0x0000000003070aa2 in llvm::FPPassManager::runOnFunction (this=0x5305b80, 
    F=...) at PassManager.cpp:1530
(gdb) frame 4
#4  0x000000000212a6a1 in (anonymous
namespace)::FunctionStackPoisoner::poisonStack (this=0x7fffffffbf60) at
AddressSanitizer.cpp:1476
1476        assert(AI);
(gdb) p AllocaPoisonCallVec.size()
$3 = 2
(gdb) p i
$6 = 0
(gdb) p AllocaVec[i]
$7 = (llvm::AllocaInst *&) @0x7fffffffc158: 0x528a608
(gdb) p AllocaVec[i]->dump()
  %retval = alloca i32, align 4
$8 = void
(gdb) p APC
$9 = (const (anonymous namespace)::FunctionStackPoisoner::AllocaPoisonCall &)
@0x7fffffffc318: {
  InsBefore = 0x52e5608, 
  Size = 1, 
  DoPoison = false
}
(gdb) p ((llvm::Instruction*)APC.InsBefore)->dump()
  call void @llvm.lifetime.start(i64 1, i8* %c) #1
$11 = void

-- 
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/20131109/779eb25b/attachment.html>


More information about the llvm-bugs mailing list