<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Crash in Legalizer pass at -O0"
href="https://bugs.llvm.org/show_bug.cgi?id=50073">50073</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Crash in Legalizer pass at -O0
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jerome@forissier.org
</td>
</tr>
<tr>
<th>CC</th>
<td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24781" name="attach_24781" title="Preprocessed source">attachment 24781</a> <a href="attachment.cgi?id=24781&action=edit" title="Preprocessed source">[details]</a></span>
Preprocessed source
PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/jerome/work/clang-12.0.0/bin/clang
--target=aarch64-linux-gnu -std=gnu99 -fdiagnostics-show-option -Wall
-Wcast-align -Werror-implicit-function-declaration -Wextra -Wfloat-equal
-Wformat-nonliteral -Wformat-security -Wformat=2 -Winit-self
-Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs
-Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith
-Wshadow -Wstrict-prototypes -Wswitch-default -Wwrite-strings
-Wno-missing-field-initializers -Wno-format-zero-length -Wredundant-decls
-Wold-style-definition -Wstrict-aliasing=2 -Wundef
-Wno-language-extension-token -Wno-gnu-zero-variadic-macro-arguments -O0
-ffunction-sections -fdata-sections -pipe -g3 -fpie -mstrict-align
-mno-outline-atomics -mgeneral-regs-only -fcolor-diagnostics -nostdinc -isystem
/home/jerome/work/clang-12.0.0/lib/clang/12.0.0/include
-Ilib/libutils/isoc/include -Ilib/libutils/ext/include -Ilib/libmbedtls/include
-Ilib/libmbedtls/mbedtls/include -Icore/lib/libtomcrypt/include
-Icore/lib/libtomcrypt/src/headers -Icore/lib/libfdt/include
-Ilib/libunw/include -Icore/arch/arm/plat-vexpress/.
-Iout/arm/core/arch/arm/kernel -D__KERNEL__ -Icore/include -include
out/arm/include/generated/conf.h -Iout/arm/core/include -Icore/arch/arm/include
-DARM64=1 -D__LP64__=1 -DTRACE_LEVEL=2 -Ildelf/include -Ilib/libutee/include
-D__FILE_ID__=core_arch_arm_kernel_trace_ext_c -c -o
out/arm/core/arch/arm/kernel/trace_ext.o core/arch/arm/kernel/trace_ext.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module
'core/arch/arm/kernel/trace_ext.c'.
4. Running pass 'Legalizer' on function '@trace_ext_get_thread_id'
#0 0x00000000024b8fc3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/jerome/work/clang-12.0.0/bin/clang+0x24b8fc3)
#1 0x00000000024b6f0e llvm::sys::RunSignalHandlers()
(/home/jerome/work/clang-12.0.0/bin/clang+0x24b6f0e)
#2 0x00000000024b847d llvm::sys::CleanupOnSignal(unsigned long)
(/home/jerome/work/clang-12.0.0/bin/clang+0x24b847d)
#3 0x0000000002444940 CrashRecoverySignalHandler(int)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2444940)
#4 0x00007f2670e723c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
#5 0x0000000002e608e9
llvm::LegalizerInfo::findAction(std::vector<std::pair<unsigned short,
llvm::LegalizeActions::LegalizeAction>, std::allocator<std::pair<unsigned
short, llvm::LegalizeActions::LegalizeAction> > > const&, unsigned int)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2e608e9)
#6 0x0000000002e5f242
llvm::LegalizerInfo::findScalarLegalAction(llvm::InstrAspect const&) const
(/home/jerome/work/clang-12.0.0/bin/clang+0x2e5f242)
#7 0x0000000002e5f6a1 llvm::LegalizerInfo::getAction(llvm::LegalityQuery
const&) const (/home/jerome/work/clang-12.0.0/bin/clang+0x2e5f6a1)
#8 0x0000000002e5fa79 llvm::LegalizerInfo::getAction(llvm::MachineInstr
const&, llvm::MachineRegisterInfo const&) const
(/home/jerome/work/clang-12.0.0/bin/clang+0x2e5fa79)
#9 0x0000000002e34aa4
llvm::LegalizerHelper::legalizeInstrStep(llvm::MachineInstr&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2e34aa4)
#10 0x0000000002e30d61
llvm::Legalizer::legalizeMachineFunction(llvm::MachineFunction&,
llvm::LegalizerInfo const&, llvm::ArrayRef<llvm::GISelChangeObserver*>,
llvm::LostDebugLocObserver&, llvm::MachineIRBuilder&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2e30d61)
#11 0x0000000002e31e35
llvm::Legalizer::runOnMachineFunction(llvm::MachineFunction&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2e31e35)
#12 0x0000000001b0dace
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x1b0dace)
#13 0x0000000001e6416d llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x1e6416d)
#14 0x0000000001e69e43 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x1e69e43)
#15 0x0000000001e647df llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x1e647df)
#16 0x0000000002694886 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2694886)
#17 0x000000000318b34f
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x318b34f)
#18 0x0000000003bde614 clang::ParseAST(clang::Sema&, bool, bool)
(/home/jerome/work/clang-12.0.0/bin/clang+0x3bde614)
#19 0x0000000002be1937 clang::FrontendAction::Execute()
(/home/jerome/work/clang-12.0.0/bin/clang+0x2be1937)
#20 0x0000000002b6c461
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2b6c461)
#21 0x0000000002c7669c
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2c7669c)
#22 0x0000000000a07002 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/jerome/work/clang-12.0.0/bin/clang+0xa07002)
#23 0x0000000000a05847 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/jerome/work/clang-12.0.0/bin/clang+0xa05847)
#24 0x0000000002a30e22 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const::$_1>(long)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2a30e22)
#25 0x000000000244472d
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/home/jerome/work/clang-12.0.0/bin/clang+0x244472d)
#26 0x0000000002a307c9
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
std::allocator<char> >*, bool*) const
(/home/jerome/work/clang-12.0.0/bin/clang+0x2a307c9)
#27 0x0000000002a0072d
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/home/jerome/work/clang-12.0.0/bin/clang+0x2a0072d)
#28 0x0000000002a00977
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/home/jerome/work/clang-12.0.0/bin/clang+0x2a00977)
#29 0x0000000002a18518
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/home/jerome/work/clang-12.0.0/bin/clang+0x2a18518)
#30 0x0000000000a051fd main (/home/jerome/work/clang-12.0.0/bin/clang+0xa051fd)
#31 0x00007f26708ea0b3 __libc_start_main
/build/glibc-eX1tMB/glibc-2.31/csu/../csu/libc-start.c:342:3
#32 0x0000000000a02569 _start
(/home/jerome/work/clang-12.0.0/bin/clang+0xa02569)
clang-12: error: clang frontend command failed with exit code 139 (use -v to
see invocation)
clang version 12.0.0
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jerome/work/clang-12.0.0/bin
clang-12: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-12: note: diagnostic msg: /tmp/trace_ext-766671.c
clang-12: note: diagnostic msg: /tmp/trace_ext-766671.sh
clang-12: note: diagnostic msg:
********************</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>