Skip to content

Commit 814ddb3

Browse files
committed
Tentatively merge llvm fix for buildworld WITH_ASAN
Building world using WITH_ASAN results in an assertion when compiling certain source files referencing ifuncs: Assertion failed: (isa<Function>(Callee) || isa<GlobalAlias>(Callee)), function analyzeAllUses, file /root/freebsd/contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp, line 514. This was already reported upstream a while ago, in <llvm/llvm-project#87923>, but now there is finally a candidate fix, which seems trivial so I am importing it right away. Reported by: markj PR: 280936 Pull Request: llvm/llvm-project#113841 MFC after: 3 days (cherry picked from commit f3457ed)
1 parent 57d8795 commit 814ddb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/llvm-project/llvm/lib/Analysis/StackSafetyAnalysis.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ void StackSafetyLocalAnalysis::analyzeAllUses(Value *Ptr,
506506
// dso_preemptable aliases or aliases with interposable linkage.
507507
const GlobalValue *Callee =
508508
dyn_cast<GlobalValue>(CB.getCalledOperand()->stripPointerCasts());
509-
if (!Callee) {
509+
if (!Callee || isa<GlobalIFunc>(Callee)) {
510510
US.addRange(I, UnknownRange, /*IsSafe=*/false);
511511
break;
512512
}

0 commit comments

Comments
 (0)