[llvm-bugs] [Bug 43629] New: Constexpr new: compiler crash

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Oct 9 16:23:55 PDT 2019


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

            Bug ID: 43629
           Summary: Constexpr new: compiler crash
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zamazan4ik at tut.by
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

I am trying to make std::list constexpr in libc++. I have built clang from
trunk, patched libc++ and prepared the example on which clang crashes.

Clang diagnostic message:

Stack dump:
0.      Program arguments:
/home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/bin/clang-10 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name main.cpp -mrelocation-model static
-mthread-model posix -mframe-pointer=none -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-dwarf-column-info -debugger-tuning=gdb -nostdinc++ -resource-dir
/home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/lib/clang/10.0.0
-I /home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/include/c++/v1
-D NDEBUG -internal-isystem /usr/local/include -internal-isystem
/home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/lib/clang/10.0.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-std=gnu++2a -fdeprecated-macro -fdebug-compilation-dir
/home/zamazan4ik/OpenSource/test_llvm_lib/cmake-build-trunkclang -ferror-limit
19 -fmessage-length 0 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-faddrsig -o CMakeFiles/test_llvm_lib.dir/main.cpp.o -x c++
/home/zamazan4ik/OpenSource/test_llvm_lib/main.cpp 
1.      /home/zamazan4ik/OpenSource/test_llvm_lib/main.cpp:11:16: current
parser token ';'
2.      /home/zamazan4ik/OpenSource/test_llvm_lib/main.cpp:5:1: parsing
function body 'main'
3.      /home/zamazan4ik/OpenSource/test_llvm_lib/main.cpp:5:1: in compound
statement ('{}')
clang-10: error: unable to execute command: Segmentation fault (core dumped)
clang-10: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 10.0.0 (git at github.com:ZaMaZaN4iK/llvm-project.git
067655d7e48d69df23370dbeea20e9ca5620bbc4)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/zamazan4ik/OpenSource/LLVM_build_release_clang/install/bin
clang-10: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-10: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-10: note: diagnostic msg: /tmp/main-197fef.cpp
clang-10: note: diagnostic msg: /tmp/main-197fef.sh
clang-10: note: diagnostic msg: 

********************

Added required attachments with preprocessed file and run script.

One detail which can help: I got ICE after commenting this line:
https://github.com/ZaMaZaN4iK/llvm-project/blob/feature/list_constexpr/libcxx/include/list#L1151

If you will uncomment this line - will be compiler error (something about
lifetimes - I am not sure what it is).

-- 
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/20191009/55a9de92/attachment.html>


More information about the llvm-bugs mailing list