[LLVMdev] Add call printf instructions problems
Hongxu Chen
leftcopy.chx at gmail.com
Mon Dec 16 07:27:11 PST 2013
As Tim said, call_print is one of the root causes.
Another problem is that for a pass, you'd better use
llvm::Module::getOrInsertFunction API.
Best Regards,
Hongxu Chen
On Mon, Dec 16, 2013 at 11:22 PM, Tim Northover-2 [via LLVM] <
ml-node+s1065342n64417h18 at n5.nabble.com> wrote:
> 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.
> _______________________________________________
> LLVM Developers mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=64417&i=0>
> http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://llvm.1065342.n5.nabble.com/Add-call-printf-instructions-problems-tp64415p64417.html
> To start a new topic under LLVM - Dev, email
> ml-node+s1065342n3h84 at n5.nabble.com
> To unsubscribe from LLVM, click here<http://llvm.1065342.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2&code=bGVmdGNvcHkuY2h4QGdtYWlsLmNvbXwyfC0xMjc2Njc5OTI2>
> .
> NAML<http://llvm.1065342.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://llvm.1065342.n5.nabble.com/Add-call-printf-instructions-problems-tp64415p64418.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131216/3d6e45a4/attachment.html>
More information about the llvm-dev
mailing list