[LLVMdev] AsmParser is not robust

Chris Lattner clattner at apple.com
Fri Nov 13 10:40:35 PST 2009


On Nov 13, 2009, at 10:16 AM, Samuel Crow wrote:
> Hello all,
>
> My partner was just debugging a project that had tried to call a  
> function without arguments in the code but the declaration wasn't  
> declared with a void parameter list.  It failed with an assertion  
> that something was trying to ++ past the end of an ilist.
>
> I seem to remember Chris Lattner saying when he made the hand  
> written AsmParser that it wasn't intended to be very robust but,  
> searching the list, I can't find the post where he said it.  That  
> being said, is this worthy of a bug report?  An error message from  
> the AsmParser would be preferred over a seemingly unrelated assert.

Please file a bug, it certainly should be "robust".  Switching it to a  
hand written parser is intended to improve the robustness, not reduce  
it.  In any case, this doesn't have anything to do with the parser, it  
sounds like the code is grammatically correct but semantically invalid.

-Chris



More information about the llvm-dev mailing list