[LLVMdev] Patch to fix BrainF runtime assertion failure
dsh at linux.ucla.edu
Mon Aug 9 23:05:52 PDT 2010
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.
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 new
prototype 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
Could someone apply this for me, please?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1238 bytes
Desc: not available
More information about the llvm-dev