[LLVMdev] LLVM Pass Crashes

Hassan, Ahmad ahmad.hassan at sap.com
Fri Jan 4 07:56:56 PST 2013

Hi Team,

I am writing an LLVM pass that compiles fine and opt instrumentation goes fine as well. But when I run the instrumented C-program then I get the following stack dump. My question is, how can I debug the problem in this scenario please?

// LLVM pass compiles fine and the following OPT instrumentation goes fine for basic malloc.bc program as well. Malloc.bc runs fine without any instrumentation.
opt -o a.bc -load /data/ahmad/llvm3.1/Release+Asserts/lib/mypass.so  -MyPass < malloc.bc

$ lli a.bc

*** buffer overflow detected ***: lli terminated
======= Backtrace: =========
======= Memory map: ========
00400000-00f84000 r-xp 00000000 fc:00 1974479                            /usr/local/bin/lli
01183000-011d6000 r--p 00b83000 fc:00 1974479                            /usr/local/bin/lli
Stack dump:
0.      Program arguments: lli a.bc
Aborted (core dumped)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130104/76eef733/attachment.html>

More information about the llvm-dev mailing list