Dan Hipschman
2010-Aug-10 06:05 UTC
[LLVMdev] Patch to fix BrainF runtime assertion failure
Hi all, I downloaded LLVM to play with today and found that the BrainF example compiler fails with an assertion error like so: examples$ ./BrainF -jit /tmp/test.bf BrainF: Instructions.cpp:242: void llvm::CallInst::init(llvm::Value*, llvm::Value* const*, unsigned int): Assertion `(NumParams == FTy->getNumParams() || (FTy->isVarArg() && NumParams > FTy->getNumParams())) && "Calling a function with bad signature!"' failed. Aborted I tracked this down to bad arguments passed to the memset intrinsic.>From the svn logs it looks like the memset intrinsic was given a newprototype in April and the BrainF code hasn't been updated for this yet. This patch fixes the bug and the demo BF code I ran on it works perfectly now. Could someone apply this for me, please? Dan Hipschman -------------- next part -------------- A non-text attachment was scrubbed... Name: BrainF.patch Type: text/x-diff Size: 1238 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100809/99ec2c69/attachment.patch>
Dan Hipschman
2010-Aug-10 06:21 UTC
[LLVMdev] Patch to fix BrainF runtime assertion failure
On Mon, Aug 09, 2010 at 11:05:52PM -0700, Dan Hipschman wrote:> Could someone apply this for me, please?I just realized I didn't fix up the comments completely. Here's an identical patch plus two comment to reference the new intrinsic suffix. -------------- next part -------------- A non-text attachment was scrubbed... Name: BrainF.patch Type: text/x-diff Size: 1311 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100809/b1cc01e1/attachment.patch>
Chris Lattner
2010-Aug-10 21:46 UTC
[LLVMdev] Patch to fix BrainF runtime assertion failure
On Aug 9, 2010, at 11:21 PM, Dan Hipschman wrote:> On Mon, Aug 09, 2010 at 11:05:52PM -0700, Dan Hipschman wrote: >> Could someone apply this for me, please? > > I just realized I didn't fix up the comments completely. Here's an > identical patch plus two comment to reference the new intrinsic > suffix.Thanks! Applied in r110735, -Chris