[LLVMdev] unexpectedly loop hanging
Duncan Sands
baldrick at free.fr
Thu May 30 04:57:39 PDT 2013
Hi Alexandru,
> /*==5134== Invalid write of size 4
> ==5134== at 0x4039280: (anonymous
> namespace)::Hello::runOnModule(llvm::Module&) (in
> /home/alex/llvm/Release+Asserts/lib/Hello.so)
> ==5134== by 0x8E33DE3: llvm::MPPassManager::runOnModule(llvm::Module&) (in
> /home/alex/llvm/Release+Asserts/bin/opt)
> ==5134== by 0x8E3726F: llvm::PassManagerImpl::run(llvm::Module&) (in
> /home/alex/llvm/Release+Asserts/bin/opt)
> ==5134== by 0x8E37385: llvm::PassManager::run(llvm::Module&) (in
> /home/alex/llvm/Release+Asserts/bin/opt)
> ==5134== by 0x41AE4D2: (below main) (libc-start.c:226)
> ==5134== Address 0x46cfa40 is 0 bytes after a block of size 200 alloc'd
> ==5134== at 0x402C454: operator new[](unsigned int) (in
> /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
> ==5134== by 0x4037AE0: (anonymous
> namespace)::Hello::runOnModule(llvm::Module&) (in
> /home/alex/llvm/Release+Asserts/lib/Hello.so)*/
> ==5134== Address 0x46cfa40 is 0 bytes after a block of size 200 alloc'd
> ==5134== at 0x402C454: operator new[](unsigned int) (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
> ==5134== by 0x4037AE0: (anonymous namespace)::Hello::runOnModule(llvm::Module&) (in /home/alex/llvm/Release+Asserts/lib/Hello.so)
you are writing of the end of an array that you allocated with "new". If you
compile your program with debug info (-g) then valgrind should give you the line
number at which the allocation occurred and the line number at which the bad
write occurred.
Ciao, Duncan.
More information about the llvm-dev
mailing list