[llvm-bugs] [Bug 50466] New: crash with -fsemantic-interposition: "Alias cannot point to an interposable alias"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 25 08:46:30 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=50466

            Bug ID: 50466
           Summary: crash with -fsemantic-interposition: "Alias cannot
                    point to an interposable alias"
           Product: clang
           Version: trunk
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: szabolcs.nagy at arm.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

the following code uses various gnu extensions and compiles with gcc:

void b();
#pragma redefine_extname b b_ext
void b() {}
__typeof(b) c __asm__("c_asm") __attribute__((alias("b_ext")));
__typeof(b) a __attribute__((alias("c_asm")));
void try_a() { a(); }
void try_b() { b(); }
void try_c() { c(); }


with clang -fPIC -fsemantic-interposition, using a clang built with assertions,
i see

Alias cannot point to an interposable alias
void (...)* @a
fatal error: error in backend: Broken module found, compilation aborted!
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:
/opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -g -o /app/output.s
-mllvm --x86-asm-syntax=intel -S
--gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics
-fno-crash-diagnostics -xc -fPIC -fsemantic-interposition <source>
1.      <eof> parser at end of file
2.      Code generation
 #0 0x000055a9640fa62c llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x375562c)
 #1 0x000055a9640f84e4 llvm::sys::RunSignalHandlers()
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x37534e4)
 #2 0x000055a9640f8765 llvm::sys::CleanupOnSignal(unsigned long)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3753765)
 #3 0x000055a9640531df llvm::CrashRecoveryContext::HandleExit(int)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x36ae1df)
 #4 0x000055a9640f23ee llvm::sys::Process::Exit(int, bool)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x374d3ee)
 #5 0x000055a961d5168e LLVMErrorHandler(void*, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool) cc1_main.cpp:0:0
 #6 0x000055a96405a859 llvm::report_fatal_error(llvm::Twine const&, bool)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x36b5859)
 #7 0x000055a96405a9a8
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x36b59a8)
 #8 0x000055a963975f15
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x2fd0f15)
 #9 0x000055a9638e7197 llvm::FPPassManager::doFinalization(llvm::Module&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x2f42197)
#10 0x000055a9638f153b llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x2f4c53b)
#11 0x000055a9643d09a5 (anonymous
namespace)::EmitAssemblyHelper::EmitAssemblyWithNewPassManager(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >) BackendUtil.cpp:0:0
#12 0x000055a9643d41f3 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef,
llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3a2f1f3)
#13 0x000055a96506b7aa
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x46c67aa)
#14 0x000055a965ece4f9 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x55294f9)
#15 0x000055a96506b948 clang::CodeGenAction::ExecuteAction()
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x46c6948)
#16 0x000055a9649ea951 clang::FrontendAction::Execute()
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4045951)
#17 0x000055a964986522
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3fe1522)
#18 0x000055a964ab5f2a
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4110f2a)
#19 0x000055a961d5358c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x13ae58c)
#20 0x000055a961d4e929 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
driver.cpp:0:0
#21 0x000055a96483d815 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#22 0x000055a964053023
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x36ae023)
#23 0x000055a96483e1b4
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (.part.161) Job.cpp:0:0
#24 0x000055a9648162ca
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3e712ca)
#25 0x000055a964816f6f
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3e71f6f)
#26 0x000055a96482077a
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3e7b77a)
#27 0x000055a961c7c698 main
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x12d7698)
#28 0x00007f61094980b3 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x270b3)
#29 0x000055a961d4e49a _start
(/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x13a949a)
clang-13: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
Compiler returned: 70

-- 
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/20210525/ec80d522/attachment.html>


More information about the llvm-bugs mailing list