Created attachment 213274 [details] compile script Whilest compiling ceph-master on a recent CURRENT system the compiler crashes when compiling the common/config.cc file. Script is attached. Preproccesed source is to big to upload. Find it on: http://smtp.digiware.nl/FreeBSD/config-958680.cpp.xz The output on the console: can't implicitly cast lvalue to rvalue with this cast kind UNREACHABLE executed at /usr/srcs/head/src/contrib/llvm-project/clang/lib/Sema/Sema.cpp:538! Stack dump: 0. Program arguments: /usr/bin/c++ -Wall -fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -Wno-unused-function -Wno-unused-local-typedef -Wno-varargs -Wno-gnu-designator -Wno-missing-braces -Wno-parentheses -Wno-deprecated-register -Wno-unknown-pragmas -Wno-non-virtual-dtor -Wno-ignored-qualifiers -ftemplate-depth-1024 -Wpessimizing-move -Wredundant-move -Wno-inconsistent-missing-override -Wno-mismatched-tags -Wno-unused-private-field -Wno-address-of-packed-member -fdiagnostics-color=auto -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -O0 -g -fPIC -std=c++17 -DCEPH_DATADIR="/usr/local/share/ceph" -DCEPH_LIBDIR="/usr/local/lib" -DCEPH_PKGLIBDIR="/usr/local/lib/ceph" -D_FILE_OFFSET_BITS=64 -I/home/jenkins/workspace/ceph-master/build/src/include -I/home/jenkins/workspace/ceph-master/src -isystem /usr/local/include -isystem /home/jenkins/workspace/ceph-master/build/include -isystem /home/jenkins/workspace/ceph-master/src/xxHash -isystem /home/jenkins/workspace/ceph-master/src/rapidjson/include -isystem /home/jenkins/workspace/ceph-master/src/fmt/include -DCEPH_DEBUG_MUTEX -D_GLIBCXX_ASSERTIONS -DHAVE_CONFIG_H -D__CEPH__ -D_REENTRANT -D_THREAD_SAFE -D__STDC_FORMAT_MACROS -c -o CMakeFiles/common-common-objs.dir/config.cc.o /home/jenkins/workspace/ceph-master/src/common/config.cc 1. <eof> parser at end of file 2. /usr/local/include/boost/variant/detail/apply_visitor_unary.hpp:66:1: instantiating function definition 'boost::apply_visitor<(anonymous namespace)::assign_visitor<ConfigValues>, boost::variant<long ConfigValues::*, unsigned long ConfigValues::*, std::__1::basic_string<char> ConfigValues::*, double ConfigValues::*, bool ConfigValues::*, entity_addr_t ConfigValues::*, entity_addrvec_t ConfigValues::*, uuid_d ConfigValues::*> &>' 3. /usr/local/include/boost/variant/variant.hpp:2384:5: instantiating function definition 'boost::variant<long ConfigValues::*, unsigned long ConfigValues::*, std::__1::basic_string<char> ConfigValues::*, double ConfigValues::*, bool ConfigValues::*, entity_addr_t ConfigValues::*, entity_addrvec_t ConfigValues::*, uuid_d ConfigValues::*>::apply_visitor<const (anonymous namespace)::assign_visitor<ConfigValues> >' 4. /usr/local/include/boost/variant/variant.hpp:2344:5: instantiating function definition 'boost::variant<long ConfigValues::*, unsigned long ConfigValues::*, std::__1::basic_string<char> ConfigValues::*, double ConfigValues::*, bool ConfigValues::*, entity_addr_t ConfigValues::*, entity_addrvec_t ConfigValues::*, uuid_d ConfigValues::*>::internal_apply_visitor<boost::detail::variant::invoke_visitor<const (anonymous namespace)::assign_visitor<ConfigValues>, false> >' 5. /usr/local/include/boost/variant/variant.hpp:2319:5: instantiating function definition 'boost::variant<long ConfigValues::*, unsigned long ConfigValues::*, std::__1::basic_string<char> ConfigValues::*, double ConfigValues::*, bool ConfigValues::*, entity_addr_t ConfigValues::*, entity_addrvec_t ConfigValues::*, uuid_d ConfigValues::*>::internal_apply_visitor_impl<boost::detail::variant::invoke_visitor<const (anonymous namespace)::assign_visitor<ConfigValues>, false>, void *>' 6. /usr/local/include/boost/variant/detail/visitation_impl.hpp:194:1: instantiating function definition 'boost::detail::variant::visitation_impl<mpl_::int_<0>, boost::detail::variant::visitation_impl_step<boost::mpl::l_iter<boost::mpl::l_item<mpl_::long_<8>, long ConfigValues::*, boost::mpl::l_item<mpl_::long_<7>, unsigned long ConfigValues::*, boost::mpl::l_item<mpl_::long_<6>, std::__1::basic_string<char> ConfigValues::*, boost::mpl::l_item<mpl_::long_<5>, double ConfigValues::*, boost::mpl::l_item<mpl_::long_<4>, bool ConfigValues::*, boost::mpl::l_item<mpl_::long_<3>, entity_addr_t ConfigValues::*, boost::mpl::l_item<mpl_::long_<2>, entity_addrvec_t ConfigValues::*, boost::mpl::l_item<mpl_::long_<1>, uuid_d ConfigValues::*, boost::mpl::l_end> > > > > > > > >, boost::mpl::l_iter<boost::mpl::l_end> >, boost::detail::variant::invoke_visitor<const (anonymous namespace)::assign_visitor<ConfigValues>, false>, void *, boost::variant<long ConfigValues::*, unsigned long ConfigValues::*, std::__1::basic_string<char> ConfigValues::*, double ConfigValues::*, bool ConfigValues::*, entity_addr_t ConfigValues::*, entity_addrvec_t ConfigValues::*, uuid_d ConfigValues::*>::has_fallback_type_>' 7. /usr/local/include/boost/variant/detail/visitation_impl.hpp:138:1: instantiating function definition 'boost::detail::variant::visitation_impl_invoke<boost::detail::variant::invoke_visitor<const (anonymous namespace)::assign_visitor<ConfigValues>, false>, void *, long ConfigValues::*, boost::variant<long ConfigValues::*, unsigned long ConfigValues::*, std::__1::basic_string<char> ConfigValues::*, double ConfigValues::*, bool ConfigValues::*, entity_addr_t ConfigValues::*, entity_addrvec_t ConfigValues::*, uuid_d ConfigValues::*>::has_fallback_type_>' 8. /usr/local/include/boost/variant/detail/visitation_impl.hpp:105:1: instantiating function definition 'boost::detail::variant::visitation_impl_invoke_impl<boost::detail::variant::invoke_visitor<const (anonymous namespace)::assign_visitor<ConfigValues>, false>, void *, long ConfigValues::*>' 9. /usr/local/include/boost/variant/variant.hpp:1026:85: instantiating function definition 'boost::detail::variant::invoke_visitor<const (anonymous namespace)::assign_visitor<ConfigValues>, false>::internal_visit<long ConfigValues::*&>' 10. /home/jenkins/workspace/ceph-master/src/common/config.cc:1496:8: instantiating function definition '(anonymous namespace)::assign_visitor<ConfigValues>::operator()' #0 0x0000000003e068fe PrintStackTrace /usr/srcs/head/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:13 #1 0x0000000003e04a85 RunSignalHandlers /usr/srcs/head/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:69:18 #2 0x0000000003e08a0e HandleCrash /usr/srcs/head/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:77:5 #3 0x0000000003e08b91 CrashRecoverySignalHandler /usr/srcs/head/src/contrib/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:0:51 #4 0x000000080502e990 handle_signal /usr/srcs/head/src/lib/libthr/thread/thr_sig.c:0:3 c++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 10.0.0 (git@github.com:llvm/llvm-project.git llvmorg-10.0.0-0-gd32170dbd5b) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin c++: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script. c++: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: c++: note: diagnostic msg: /tmp/config-1726d7.cpp c++: note: diagnostic msg: /tmp/config-1726d7.sh c++: note: diagnostic msg: ********************
(In reply to Willem Jan Withagen from comment #0) > Preproccesed source is to big to upload. > Find it on: > http://smtp.digiware.nl/FreeBSD/config-958680.cpp.xz For some reason this doesn't work over IPv6: $ curl -v -O http://smtp.digiware.nl/FreeBSD/config-958680.cpp.xz * Trying 2001:4cb8:90:ffff::3:80... * TCP_NODELAY set * Connected to smtp.digiware.nl (2001:4cb8:90:ffff::3) port 80 (#0) > GET /FreeBSD/config-958680.cpp.xz HTTP/1.1 > Host: smtp.digiware.nl > User-Agent: curl/7.68.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 404 Not Found < Date: Sat, 11 Apr 2020 11:39:43 GMT < Server: Apache/2.4.41 (FreeBSD) PHP/7.2.26 < Content-Length: 196 < Content-Type: text/html; charset=iso-8859-1 < <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> </body></html> but it *does* work over IPv4? $ curl -4 -v -O http://smtp.digiware.nl/FreeBSD/config-958680.cpp.xz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 176.74.240.9:80... * TCP_NODELAY set * Connected to smtp.digiware.nl (176.74.240.9) port 80 (#0) > GET /FreeBSD/config-958680.cpp.xz HTTP/1.1 > Host: smtp.digiware.nl > User-Agent: curl/7.68.0 > Accept: */* > * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Date: Sat, 11 Apr 2020 11:40:38 GMT < Server: Apache/2.4.41 (FreeBSD) PHP/7.2.26 < Last-Modified: Sat, 11 Apr 2020 10:16:09 GMT < ETag: "14dce4-5a3012386c54b" < Accept-Ranges: bytes < Content-Length: 1367268 < Content-Type: application/x-xz < { [2641 bytes data] 100 1335k 100 1335k 0 0 14.1M 0 --:--:-- --:--:-- --:--:-- 14.1M * Connection #0 to host smtp.digiware.nl left intact Anyway I got the file now.
Reduced and reported upstream: https://bugs.llvm.org/show_bug.cgi?id=45521
A commit references this bug: Author: dim Date: Wed Jul 8 16:50:48 UTC 2020 New revision: 363013 URL: https://svnweb.freebsd.org/changeset/base/363013 Log: Merge commit 065fc1eafe7c from llvm git (by Richard Smith): PR45521: Preserve the value kind when performing a standard conversion sequence on a glvalue expression. If the sequence is supposed to perform an lvalue-to-rvalue conversion, then one will be specified as the first conversion in the sequence. Otherwise, one should not be invented. This should fix clang crashing with "can't implicitly cast lvalue to rvalue with this cast kind", followed by "UNREACHABLE executed at /usr/src/contrib/llvm-project/clang/lib/Sema/Sema.cpp:538!", when building recent versions of Ceph, and the CPAN module SYBER/Date-5.2.0. Reported by: Willem Jan Withagen <wjw@digiware.nl>, eserte12@yahoo.de PR: 245530, 247812 MFC after: 3 days Changes: head/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp
*** Bug 247812 has been marked as a duplicate of this bug. ***
^Triage: Assign to committer resolving and track pending merge (assuming stable/11 doesn't need it (no clang 10)).
A commit references this bug: Author: dim Date: Sat Jul 11 09:43:17 UTC 2020 New revision: 363092 URL: https://svnweb.freebsd.org/changeset/base/363092 Log: MFC r363013: Merge commit 065fc1eafe7c from llvm git (by Richard Smith): PR45521: Preserve the value kind when performing a standard conversion sequence on a glvalue expression. If the sequence is supposed to perform an lvalue-to-rvalue conversion, then one will be specified as the first conversion in the sequence. Otherwise, one should not be invented. This should fix clang crashing with "can't implicitly cast lvalue to rvalue with this cast kind", followed by "UNREACHABLE executed at /usr/src/contrib/llvm-project/clang/lib/Sema/Sema.cpp:538!", when building recent versions of Ceph, and the CPAN module SYBER/Date-5.2.0. Reported by: Willem Jan Withagen <wjw@digiware.nl>, eserte12@yahoo.de PR: 245530, 247812 Changes: _U stable/11/ _U stable/11/contrib/llvm-project/clang/ stable/11/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp stable/11/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp _U stable/12/ stable/12/contrib/llvm-project/clang/lib/Sema/SemaExprCXX.cpp stable/12/contrib/llvm-project/clang/lib/Sema/SemaOverload.cpp