<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 - Clang-8 crashes Running pass 'X86 pseudo instruction expansion pass' on function '@print_diff_percent'"
href="https://bugs.llvm.org/show_bug.cgi?id=40924">40924</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Clang-8 crashes Running pass 'X86 pseudo instruction expansion pass' on function '@print_diff_percent'
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>raj.khem@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=21536" name="attach_21536" title="test case">attachment 21536</a> <a href="attachment.cgi?id=21536&action=edit" title="test case">[details]</a></span>
test case
Attached test case produces a crash in clang on x86_64
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'debug-7f794a.c'.
4. Running pass 'X86 pseudo instruction expansion pass' on function
'@print_diff_percent'
#0 0x0000558d6884d6c2
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x2e606c2)
#1 0x0000558d6884ab20 llvm::sys::RunSignalHandlers()
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x2e5db20)
#2 0x0000558d6884db98
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x2e60b98)
#3 0x00007f006959b150
(/mnt/a/yoe/build/tmp/sysroots-uninative/x86_64-linux/lib/libpthread.so.0+0x12150)
#4 0x0000558d67eba688
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x24cd688)
#5 0x0000558d6824f628 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x2862628)
#6 0x0000558d6824faa3 llvm::FPPassManager::runOnModule(llvm::Module&)
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x2862aa3)
#7 0x0000558d68250257 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x2863257)
#8 0x0000558d68e3522f 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> >)
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x344822f)
#9 0x0000558d692b9c36
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x38ccc36)
#10 0x0000558d6a1064b3 clang::ParseAST(clang::Sema&, bool, bool)
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x47194b3)
#11 0x0000558d692b89f2 clang::CodeGenAction::ExecuteAction()
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x38cb9f2)
#12 0x0000558d69203ab0 clang::FrontendAction::Execute()
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x3816ab0)
#13 0x0000558d69157b58
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x376ab58)
#14 0x0000558d692b4362
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x38c7362)
#15 0x0000558d672290c0 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x183c0c0)
#16 0x0000558d67226f29 main
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x1839f29)
#17 0x00007f006908108b __libc_start_main
(/mnt/a/yoe/build/tmp/sysroots-uninative/x86_64-linux/lib/libc.so.6+0x2408b)
#18 0x0000558d6722302e _start
(/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8+0x183602e)
./debug-7f794a.sh: line 4: 5121 Segmentation fault (core dumped)
"/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native/usr/bin/clang-8"
"-cc1" "-triple" "x86_64-yoe-linux-musl" "-emit-obj" "-disable-free"
"-disable-llvm-verifier"
"-discard-value-names" "-main-file-name" "debug.c" "-mrelocation-model" "pic"
"-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim" "-fmath-errno"
"-mfpmath" "sse" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables"
"-fuse-init-array" "-target-cpu" "core2" "-target-feature" "+sse3"
"-target-feature" "-sse2" "-dwarf-column-info" "-debug-info-kind=limited"
"-dwarf-version=4" "-debugger-tuning=gdb" "-momit-leaf-frame-pointer"
"-coverage-notes-file"
"/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/build/libmcount/debug.gcno"
"-D" "_FORTIFY_SOURCE=2" "-D" "_GNU_SOURCE" "-D" "HAVE_CXA_DEMANGLE" "-D"
"HAVE_PERF_CLOCKID" "-D" "HAVE_PERF_CTXSW" "-D" "HAVE_LIBELF" "-D" "HAVE_LIBDW"
"-fmacro-prefix-map=/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0=/usr/src/debug/uftrace/0.9.2-r0"
"-O2" "-Wno-error=unused-command-line-argument" "-Wformat" "-Wformat-security"
"-Werror=format-security" "-W" "-Wall" "-Wno-unused-parameter"
"-Wno-missing-field-initializers"
"-fdebug-prefix-map=/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0=/usr/src/debug/uftrace/0.9.2-r0"
"-fdebug-prefix-map=/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot="
"-fdebug-prefix-map=/mnt/a/yoe/build/tmp/work/core2-64-yoe-linux-musl/uftrace/0.9.2-r0/recipe-sysroot-native="
"-ferror-limit" "19" "-fmessage-length" "131" "-fvisibility" "hidden"
"-stack-protector" "2" "-fobjc-runtime=gcc" "-fdiagnostics-show-option"
"-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-x" "c"
"debug-7f794a.c" "-faddrsig"</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>