[LLVMdev] FunctionPassManager Issue

Reid Spencer reid at x10sys.com
Wed Apr 14 22:40:00 PDT 2004


On most libc implementations, gets is a macro not a function which is
why the FunctionPassManager can't find it. But, if you were compiling
from C, it should never have been requested as a function. Is this in
LLVM assembly that you tried to call gets? If so, that's the problem, it
doesn't (and won't) exist anywhere. Linux has deprecated use of gets
forever. From the man page:

BUGS
       Never use gets().  Because it is impossible to tell without
       knowing the data in advance how many  characters  gets()  will
       read,  and  because gets() will continue to store characters past
       the end of the buffer, it is extremely dangerous to use.  It has
       been  used  to  break  computer  security.  Use fgets() instead.

Reid.

On Wed, 2004-04-14 at 20:11, Alex Li wrote:
> Hi,
> 
> I'm a cs326 student that uses LLVM for our MP. While some of the COOL 
> program can be run seamlessly, I get the following assertion error for 
> many of them.
> 
> lli: Pass.cpp:95: bool llvm::FunctionPassManager::run(llvm::Function&):
> >> Assertion `(&F == mF) && "ModuleProvider does not contain this
> >> function!"' failed.
> >> 
> >> 
> 
> It seems like I need to link a library to it but I'm not sure how to resolve this.
> 
> Funny thing, when I use lli -force-interpreter, some of the program runs but have this error message 
> 
> Tried to execute an unknown external function: sbyte * (sbyte *) * gets
> 
> Again, I'd like to know how I should link in the function so that it 
> doesn't complain or fail.
> 
> Thank you very much.
> 
> Alex
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev


_______________________
Reid Spencer
President & CTO
eXtensible Systems, Inc.
rspencer at x10sys.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040414/0f547659/attachment.sig>


More information about the llvm-dev mailing list