[PATCH] D128830: [Pipelines] Introduce DAE after ArgumentPromotion
Douglas Yung via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 26 03:37:03 PDT 2022
dyung added a comment.
In D128830#3751368 <https://reviews.llvm.org/D128830#3751368>, @dyung wrote:
> We also saw this assert on our Windows build, and it also can be reproduced in Linux:
>
> $ cat test2.c
> static char *getenv(char *) {}
> void foo() { getenv(""); }
> $ ~/src/upstream/879f5118fc74657e4a5c4eff6810098e1eed75ac-linux/bin/clang -c -O3 test2.c
> test2.c:1:27: warning: omitting the parameter name in a function definition is a C2x extension [-Wc2x-extensions]
> static char *getenv(char *) {}
> ^
> test2.c:1:30: warning: non-void function does not return a value [-Wreturn-type]
> static char *getenv(char *) {}
> ^
> clang: /home/dyung/src/upstream/llvm_clean_git/llvm/lib/Analysis/CGSCCPassManager.cpp:958: updateCGAndAnalysisManagerForPass(llvm::LazyCallGraph&, llvm::LazyCallGraph::SCC&, llvm::LazyCallGraph::Node&, llvm::CGSCCAnalysisManager&, llvm::CGSCCUpdateResult&, llvm::FunctionAnalysisManager&, bool)::<lambda(llvm::Function&)>: Assertion `RefereeN && "Visited function should already have an associated node"' failed.
>
> The key seems to be the special function getenv(). If I rename the function, the crash does not occur.
Note that our internal builder found this while trying to build compiler-rt/lib/profile/InstrProfilingFile.c using the newly built compiler. If you think this might take a while to debug, could you please revert the change while you investigate?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128830/new/
https://reviews.llvm.org/D128830
More information about the cfe-commits
mailing list