[llvm-bugs] [Bug 43669] New: Segfault when compiling boot/beast when openmp is enabled

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 14 02:43:03 PDT 2019


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

            Bug ID: 43669
           Summary: Segfault when compiling boot/beast when openmp is
                    enabled
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jc_monnin at emailplus.org
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

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

https://www.boost.org/doc/libs/1_71_0/libs/beast/example/websocket/server/async/websocket_server_async.cpp


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:

https://wandbox.org/permlink/sOJ5tV7g62wqKUGI

-- 
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/20191014/257a5baa/attachment-0001.html>


More information about the llvm-bugs mailing list