[llvm] [Attributor] Pack out arguments into a struct (PR #119267)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 1 08:40:34 PST 2025


elhewaty wrote:

@arsenm, @jdoerfert @shiltian @vidsinghal 

I run into this crash, any help?

```
opt: /home/mohamed/Desktop/open-source/llvm/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:168: llvm::ilist_iterator<OptionsT, IsReverse, IsConst>::reference llvm::ilist_iterator<OptionsT, IsReverse, IsConst>::operator*() const [with OptionsT = llvm::ilist_detail::node_options<llvm::BasicBlock, true, false, void, false, void>; bool IsReverse = false; bool IsConst = false; reference = llvm::BasicBlock&]: Assertion `!NodePtr->isKnownSentinel()' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: /home/mohamed/Desktop/open-source/llvm/build/bin/opt -S -passes=attributor
1.	Running pass "attributor" on module "<stdin>"
 #0 0x0000628857e7ad22 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x1a12d22)
 #1 0x0000628857e7799f llvm::sys::RunSignalHandlers() (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x1a0f99f)
 #2 0x0000628857e77ae5 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007383fd445320 (/lib/x86_64-linux-gnu/libc.so.6+0x45320)
 #4 0x00007383fd49eb1c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x00007383fd49eb1c __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x00007383fd49eb1c pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x00007383fd44526e raise ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x00007383fd4288ff abort ./stdlib/abort.c:81:7
 #9 0x00007383fd42881b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x00007383fd43b507 (/lib/x86_64-linux-gnu/libc.so.6+0x3b507)
#11 0x0000628859ecb52a (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x3a6352a)
#12 0x0000628859f203a7 (anonymous namespace)::AAConvertOutArgumentFunction::manifest(llvm::Attributor&) AttributorAttributes.cpp:0:0
#13 0x0000628859ea74b1 llvm::Attributor::manifestAttributes() (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x3a3f4b1)
#14 0x0000628859ec3f39 llvm::Attributor::run() (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x3a5bf39)
#15 0x0000628859ec6237 runAttributorOnFunctions(llvm::InformationCache&, llvm::SetVector<llvm::Function*, llvm::SmallVector<llvm::Function*, 0u>, llvm::DenseSet<llvm::Function*, llvm::DenseMapInfo<llvm::Function*, void>>, 0u>&, llvm::AnalysisGetter&, llvm::CallGraphUpdater&, bool, bool) (.part.0) Attributor.cpp:0:0
#16 0x0000628859ec6dc0 llvm::AttributorPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x3a5edc0)
#17 0x0000628859ad5f55 llvm::detail::PassModel<llvm::Module, llvm::AttributorPass, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) PassBuilder.cpp:0:0
#18 0x000062885813601d llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x1cce01d)
#19 0x000062885995ff23 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::ArrayRef<std::function<void (llvm::PassBuilder&)>>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool, bool) (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x34f7f23)
#20 0x0000628857e53e0e optMain (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x19ebe0e)
#21 0x00007383fd42a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#22 0x00007383fd42a28b call_init ./csu/../csu/libc-start.c:128:20
#23 0x00007383fd42a28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#24 0x0000628857e46365 _start (/home/mohamed/Desktop/open-source/llvm/build/bin/opt+0x19de365)
Aborted (core dumped)
Traceback (most recent call last):
  File "/home/mohamed/Desktop/open-source/llvm/llvm-project/llvm/utils/update_test_checks.py", line 370, in <module>
    main()
  File "/home/mohamed/Desktop/open-source/llvm/llvm-project/llvm/utils/update_test_checks.py", line 174, in main
    raw_tool_output = common.invoke_tool(
                      ^^^^^^^^^^^^^^^^^^^
  File "/home/mohamed/Desktop/open-source/llvm/llvm-project/llvm/utils/UpdateTestChecks/common.py", line 531, in invoke_tool
    stdout = subprocess.check_output(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '~/Desktop/open-source/llvm/build/bin/opt -S -passes=attributor' returned non-zero exit status 134.
```

https://github.com/llvm/llvm-project/pull/119267


More information about the llvm-commits mailing list