https://llvm.org/bugs/show_bug.cgi?id=25556
Bug ID: 25556 Summary: Segfault in inferPrototypeAttributes Product: tools Version: 3.7 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: opt Assignee: unassignedb...@nondot.org Reporter: pe...@trailofbits.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified opt produces a NULL-pointer dereference when trying to infer the prototype of a declaration of __isoc99_sscanf. If __isoc99_sscanf is declared as having only a single argument then the following code segfaults when trying to access the parameter type of param 1. File: llvm/lib/Transforms/IPO/FunctionAttrs.cpp Function: inferPrototypeAttributes 1714 case LibFunc::dunder_isoc99_sscanf: 1715 if (FTy->getNumParams() < 1 || !FTy->getParamType(0)->isPointerTy() || 1716 !FTy->getParamType(1)->isPointerTy()) 1717 return false; I have ensured that my declaration of __isoc99_sscanf is attributed with llvm::Attribute::NoBuiltin but this attribute appears to be ignored during this inference phase. The only checked attribute is llvm::Attribute::OptimizeNone. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs