<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 - Segfault when compiling boot/beast when openmp is enabled"
href="https://bugs.llvm.org/show_bug.cgi?id=43669">43669</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Segfault when compiling boot/beast when openmp is enabled
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>9.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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Frontend
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jc_monnin@emailplus.org
</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>clang 9 segfaults when compiling one of the boost/beast sample programs when
openmp is enabled:
clang++ -fopenmp=libomp -c -O0 -emit-llvm -save-temps
websocket_server_async.cpp
Stack dump:
0. Program arguments: /usr/bin/clang-9 -cc1 -triple x86_64-pc-linux-gnu
-emit-llvm-bc -emit-llvm-uselists -save-temps=cwd -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name
websocket_server_async.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie
-mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/home/jean-claude/code/clang-beast-test/websocket_server_async.gcno
-resource-dir /usr/lib/clang/9.0.0 -O0 -fdeprecated-macro
-fdebug-compilation-dir /home/jean-claude/code/clang-beast-test -ferror-limit
19 -fmessage-length 0 -fopenmp -stack-protector 2 -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics
-disable-llvm-passes -faddrsig -o websocket_server_async.tmp.bc -x
c++-cpp-output websocket_server_async.ii
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. /usr/include/boost/beast/http/detail/rfc7230.ipp:80:1: Generating code
for declaration 'boost::beast::http::detail::is_token_char'
#0 0x00007f11ebe70b7b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/bin/../lib/libLLVM-9.so+0xb08b7b)
#1 0x00007f11ebe6ea44 llvm::sys::RunSignalHandlers()
(/usr/bin/../lib/libLLVM-9.so+0xb06a44)
#2 0x00007f11ebe6ebd6 (/usr/bin/../lib/libLLVM-9.so+0xb06bd6)
#3 0x00007f11ea0d1fb0 __restore_rt (/usr/bin/../lib/libc.so.6+0x3bfb0)
#4 0x00007f11ebfe1844 llvm::PointerType::get(llvm::Type*, unsigned int)
(/usr/bin/../lib/libLLVM-9.so+0xc79844)
#5 0x00007f11eac0b308
clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP(llvm::Value*,
llvm::ArrayRef<llvm::Value*>, bool, bool, clang::SourceLocation, llvm::Twine
const&) (/usr/bin/../lib/libclangCodeGen.so.9+0x240308)
clang-9: error: unable to execute command: Segmentation fault (core dumped)
clang-9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-9: note: diagnostic msg: PLEASE submit a bug report to and include the
crash backtrace, preprocessed source, and associated run script.
clang-9: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /tmp/websocket_server_async-ec90ef.cpp
clang-9: note: diagnostic msg: /tmp/websocket_server_async-ec90ef.sh
clang-9: note: diagnostic msg:
********************
Compiled program is
<a href="https://www.boost.org/doc/libs/1_71_0/libs/beast/example/websocket/server/async/websocket_server_async.cpp">https://www.boost.org/doc/libs/1_71_0/libs/beast/example/websocket/server/async/websocket_server_async.cpp</a>
Using clang 9 from arch
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
It's also reproducible in wandbox:
<a href="https://wandbox.org/permlink/sOJ5tV7g62wqKUGI">https://wandbox.org/permlink/sOJ5tV7g62wqKUGI</a></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>