https://bugs.llvm.org/show_bug.cgi?id=41665
Bug ID: 41665
Summary: SimplifyLibCalls.cpp - optimizeDoubleFP - checking a
pointer after dereferencing
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedb...@nondot.org
Reporter: llvm-...@redking.me.uk
CC: e.mene...@samsung.com, llvm-bugs@lists.llvm.org
Blocks: 41655
Reported in https://www.viva64.com/en/b/0629/
static Value *optimizeDoubleFP(CallInst *CI, IRBuilder<> &B,
bool isBinary, bool isPrecise = false) {
....
Function *CalleeFn = CI->getCalledFunction();
StringRef CalleeNm = CalleeFn->getName(); // <=
AttributeList CalleeAt = CalleeFn->getAttributes();
if (CalleeFn && !CalleeFn->isIntrinsic()) { // <=
....
}
Theres a number of places later on as well that assume CalleeFn is not null.
Last touched by @evandro at rL338905
Do we actually need the if(CalleeFn) test - the previous version didn't check
at all.
Referenced Bugs:
https://bugs.llvm.org/show_bug.cgi?id=41655
[Bug 41655] Finding Bugs in LLVM 8 with PVS-Studio
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs