[llvm-bugs] [Bug 51724] New: Constant ValueID not recognized
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Sep 2 11:55:08 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51724
Bug ID: 51724
Summary: Constant ValueID not recognized
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: phosek at chromium.org
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Created attachment 25221
--> https://bugs.llvm.org/attachment.cgi?id=25221&action=edit
Clang crash reproducer
We ran into this failure when trying to use -fmerge-functions.
```
Constant ValueID not recognized.
UNREACHABLE executed at
/src/clang-llvm/llvm-project/llvm/lib/Transforms/Utils/FunctionComparator.cpp:399!
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: ../bin/clang++ -cc1 -triple x86_64-unknown-fuchsia
-emit-obj -massembler-fatal-warnings --mrelax-relocations -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name
zircon_platform_buffer.cc -mrelocation-model pic -pic-level 2 -pic-is-pie
-mframe-pointer=none -fno-rounding-math -mconstructor-aliases -munwind-tables
-target-cpu x86-64-v2 -mllvm -x86-branches-within-32B-boundaries
-debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -mllvm
-crash-diagnostics-dir=clang-crashreports -ffunction-sections -fdata-sections
-fcoverage-compilation-dir=. -sys-header-deps -D
TOOLCHAIN_VERSION=dO8igrHyLDfgq8txd8Qx0mI9oJqFLswAMLcIBKLF6TYC -D
_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D NDEBUG=1 -D
_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS=1 -D MAGMA_DEBUG_INTERNAL_USE_ONLY=0
-D MAGMA_ENABLE_TRACING -O3 -Wall -Wextra -Wnewline-eof -Wconversion
-Wimplicit-fallthrough -Wno-unused-parameter -Wno-sign-conversion
-Wno-c99-designator -Werror -Wno-error=deprecated-declarations -Wthread-safety
-Wno-deprecated-copy -Wno-suggest-override -std=c++17 -fdeprecated-macro
-fdebug-compilation-dir=. -ferror-limit 19 -fvisibility hidden
-fvisibility-inlines-hidden -fsanitize=safe-stack -stack-protector 2
-ftrivial-auto-var-init=pattern -fno-rtti -fgnuc-version=4.2.1
-fno-legacy-pass-manager -fcolor-diagnostics -vectorize-loops -vectorize-slp
-debug-info-kind=constructor -fmerge-functions -faddrsig
-D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c++ zircon_platform_buffer-84a54b.cpp
1. <eof> parser at end of file
2. Optimizer
#0 0x00000000092b3a5a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/src/clang-llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:11
#1 0x00000000092b3b6b PrintStackTraceSignalHandler(void*)
/src/clang-llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:632:1
#2 0x00000000092b2423 llvm::sys::RunSignalHandlers()
/src/clang-llvm/llvm-project/llvm/lib/Support/Signals.cpp:97:5
#3 0x00000000092b41a5 SignalHandler(int)
/src/clang-llvm/llvm-project/llvm/lib/Support/Unix/Signals.inc:407:1
#4 0x00007feff6aac140 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
#5 0x00007feff67b9ce1 raise (/lib/x86_64-linux-gnu/libc.so.6+0x3bce1)
#6 0x00007feff67a3537 abort (/lib/x86_64-linux-gnu/libc.so.6+0x25537)
#7 0x00000000091daff0 llvm::install_out_of_memory_new_handler()
/src/clang-llvm/llvm-project/llvm/lib/Support/ErrorHandling.cpp:194:0
#8 0x0000000009332127 llvm::FunctionComparator::cmpConstants(llvm::Constant
const*, llvm::Constant const*) const
/src/clang-llvm/llvm-project/llvm/lib/Transforms/Utils/FunctionComparator.cpp:402:1
#9 0x0000000009331d87 llvm::FunctionComparator::cmpConstants(llvm::Constant
const*, llvm::Constant const*) const
/src/clang-llvm/llvm-project/llvm/lib/Transforms/Utils/FunctionComparator.cpp:357:15
#10 0x00000000093322a7 llvm::FunctionComparator::cmpValues(llvm::Value const*,
llvm::Value const*) const
/src/clang-llvm/llvm-project/llvm/lib/Transforms/Utils/FunctionComparator.cpp:767:5
#11 0x0000000009333da1
llvm::FunctionComparator::cmpBasicBlocks(llvm::BasicBlock const*,
llvm::BasicBlock const*) const
/src/clang-llvm/llvm-project/llvm/lib/Transforms/Utils/FunctionComparator.cpp:807:17
#12 0x0000000009334565 llvm::FunctionComparator::compare()
/src/clang-llvm/llvm-project/llvm/lib/Transforms/Utils/FunctionComparator.cpp:896:13
#13 0x0000000008894caa (anonymous
namespace)::MergeFunctions::FunctionNodeCmp::operator()((anonymous
namespace)::FunctionNode const&, (anonymous namespace)::FunctionNode const&)
const
/src/clang-llvm/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:220:29
#14 0x00000000088947ef std::__2::__tree_node_base<void*>*&
std::__2::__tree<(anonymous namespace)::FunctionNode, (anonymous
namespace)::MergeFunctions::FunctionNodeCmp, std::__2::allocator<(anonymous
namespace)::FunctionNode> >::__find_equal<(anonymous
namespace)::FunctionNode>(std::__2::__tree_end_node<std::__2::__tree_node_base<void*>*>*&,
(anonymous namespace)::FunctionNode const&)
/usr/local/google/home/phosek/fuchsia/prebuilt/third_party/clang/linux-x64/bin/../include/c++/v1/__tree:1975:17
#15 0x00000000088946bc std::__2::pair<std::__2::__tree_iterator<(anonymous
namespace)::FunctionNode, std::__2::__tree_node<(anonymous
namespace)::FunctionNode, void*>*, long>, bool> std::__2::__tree<(anonymous
namespace)::FunctionNode, (anonymous
namespace)::MergeFunctions::FunctionNodeCmp, std::__2::allocator<(anonymous
namespace)::FunctionNode> >::__emplace_unique_key_args<(anonymous
namespace)::FunctionNode, (anonymous namespace)::FunctionNode>((anonymous
namespace)::FunctionNode const&, (anonymous namespace)::FunctionNode&&)
/usr/local/google/home/phosek/fuchsia/prebuilt/third_party/clang/linux-x64/bin/../include/c++/v1/__tree:2091:26
#16 0x00000000088945fe std::__2::__tree<(anonymous namespace)::FunctionNode,
(anonymous namespace)::MergeFunctions::FunctionNodeCmp,
std::__2::allocator<(anonymous namespace)::FunctionNode>
>::__insert_unique((anonymous namespace)::FunctionNode&&)
/usr/local/google/home/phosek/fuchsia/prebuilt/third_party/clang/linux-x64/bin/../include/c++/v1/__tree:1260:16
#17 0x0000000008893c8d std::__2::set<(anonymous namespace)::FunctionNode,
(anonymous namespace)::MergeFunctions::FunctionNodeCmp,
std::__2::allocator<(anonymous namespace)::FunctionNode> >::insert((anonymous
namespace)::FunctionNode&&)
/usr/local/google/home/phosek/fuchsia/prebuilt/third_party/clang/linux-x64/bin/../include/c++/v1/set:687:25
#18 0x00000000088937a6 (anonymous
namespace)::MergeFunctions::insert(llvm::Function*)
/src/clang-llvm/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:905:14
#19 0x0000000008892378 (anonymous
namespace)::MergeFunctions::runOnModule(llvm::Module&)
/src/clang-llvm/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:450:20
#20 0x0000000008891da8 llvm::MergeFunctionsPass::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
/src/clang-llvm/llvm-project/llvm/lib/Transforms/IPO/MergeFunctions.cpp:327:7
#21 0x000000000aecbbc7 llvm::detail::PassModel<llvm::Module,
llvm::MergeFunctionsPass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
/src/clang-llvm/llvm-project/llvm/include/llvm/IR/PassManagerInternal.h:85:17
#22 0x000000000869523d llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
/src/clang-llvm/llvm-project/llvm/include/llvm/IR/PassManager.h:509:16
#23 0x0000000009f5728e (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::__2::unique_ptr<llvm::raw_pwrite_stream,
std::__2::default_delete<llvm::raw_pwrite_stream> >)
/src/clang-llvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1495:5
#24 0x0000000009f54df9 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef,
llvm::Module*, clang::BackendAction,
std::__2::unique_ptr<llvm::raw_pwrite_stream,
std::__2::default_delete<llvm::raw_pwrite_stream> >)
/src/clang-llvm/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1661:5
#25 0x000000000a3c2af7
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/src/clang-llvm/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:338:7
#26 0x000000000caa5ac1 clang::ParseAST(clang::Sema&, bool, bool)
/src/clang-llvm/llvm-project/clang/lib/Parse/ParseAST.cpp:178:12
#27 0x000000000a1f74cc clang::ASTFrontendAction::ExecuteAction()
/src/clang-llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1060:1
#28 0x000000000a3be6b2 clang::CodeGenAction::ExecuteAction()
/src/clang-llvm/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1072:5
#29 0x000000000a1f6efc clang::FrontendAction::Execute()
/src/clang-llvm/llvm-project/clang/lib/Frontend/FrontendAction.cpp:955:7
#30 0x000000000a133a01
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/src/clang-llvm/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:974:23
#31 0x000000000a3ad21e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/src/clang-llvm/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:278:8
#32 0x0000000005c92384 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /src/clang-llvm/llvm-project/clang/tools/driver/cc1_main.cpp:246:13
#33 0x0000000005c84dab ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
/src/clang-llvm/llvm-project/clang/tools/driver/driver.cpp:338:5
#34 0x0000000005c84015 main
/src/clang-llvm/llvm-project/clang/tools/driver/driver.cpp:409:5
#35 0x00007feff67a4d0a __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
#36 0x0000000005c8385a _start (../bin/clang+++0x5c8385a)
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210902/6b62d370/attachment-0001.html>
More information about the llvm-bugs
mailing list