[LLVMdev] Add call printf instructions problems

Tim Northover t.p.northover at gmail.com
Mon Dec 16 07:19:04 PST 2013


Hi Jin,

It's difficult to say just from looking at a pass, but one thing looked odd:

> CallInst *call_print = CallInst::Create(call_print,paramArrayRef,"",ins_temp);

This looks very dodgy. The "call_print" being used as an argument is
the (uninitialised) one that's just been declared. This could be the
source of the assertion failure (though a segfault is just as likely).

Other than that I'd suggest hooking up a debugger and going up the
call frames when that assertion hits. That should tell you exactly
which line of your pass is causing trouble.

Cheers.

Tim.



More information about the llvm-dev mailing list