Bug 238607 - devel/folly: clang 8 crashes during build
Summary: devel/folly: clang 8 crashes during build
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2019-06-16 12:31 UTC by Jan Beich
Modified: 2021-01-30 13:26 UTC (History)
3 users (show)

See Also:


Attachments
folly/io/RecordIO.cpp (preprocessed, compressed) (563.55 KB, application/x-xz)
2019-06-16 12:31 UTC, Jan Beich
no flags Details
command line args (for clang 8) (4.17 KB, text/plain)
2019-06-16 12:31 UTC, Jan Beich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2019-06-16 12:31:01 UTC
Created attachment 205116 [details]
folly/io/RecordIO.cpp (preprocessed, compressed)

Probably a regression from base r349004 as 11.3-RC1 isn't affected.

FAILED: CMakeFiles/folly_base.dir/folly/io/RecordIO.cpp.o
/usr/bin/c++  -DFOLLY_XLOG_STRIP_PREFIXES=\"/wrkdirs/usr/ports/devel/folly/work/folly-2019.06.10.00:/wrkdirs/usr/ports/devel/folly/work/.build\" -DGFLAGS_IS_A_DLL=0 -D_GNU_SOURCE -D_REENTRANT -I/wrkdirs/usr/ports/devel/folly/work/folly-2019.06.10.00 -I. -I/usr/local/include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -fPIC -O2 -pipe -fstack-protector-strong -fno-strict-aliasing  -fPIC -g -Wall -Wextra -O3   -g -std=gnu++1z -finput-charset=UTF-8 -fsigned-char -Wall -Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused -Wunused-label -Wunused-result -Wno-noexcept-type -Wno-nullability-completeness -Wno-inconsistent-missing-override -faligned-new -fopenmp -MD -MT CMakeFiles/folly_base.dir/folly/io/RecordIO.cpp.o -MF CMakeFiles/folly_base.dir/folly/io/RecordIO.cpp.o.d -o CMakeFiles/folly_base.dir/folly/io/RecordIO.cpp.o -c /wrkdirs/usr/ports/devel/folly/work/folly-2019.06.10.00/folly/io/RecordIO.cpp
Assertion failed: (!Init->isValueDependent()), function checkInitIsICE, file /poudriere/jails/head-amd64/usr/src/contrib/llvm/tools/clang/lib/AST/Decl.cpp, line 2342.
c++: error: unable to execute command: Abort trap
c++: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 8.0.1 (branches/release_80 363030) (based on LLVM 8.0.1)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-06-16 12:31:40 UTC
Created attachment 205117 [details]
command line args (for clang 8)
Comment 2 Dimitry Andric freebsd_committer freebsd_triage 2019-06-17 07:51:17 UTC
I can reproduce, and am investigating.  It is some C++17 feature that goes awry.

Reduced to:

// clang -cc1 -triple x86_64-- -S -std=c++17 RecordIO-min.cpp
// Assertion failed: (!Init->isValueDependent()), function checkInitIsICE,
// file tools/clang/lib/AST/Decl.cpp, line 2342.
template <int> struct a;
template <class b, class> struct c {
  static constexpr int f = b ::d;
  c(a<f>);
};
template <class e, class g = int> c(e)->c<e, g>;
Comment 3 Mark Johnston freebsd_committer freebsd_triage 2020-11-24 21:19:10 UTC
Looks like this might be OBE?  The LLVM PR[1] is still open, but devel/folly apparently builds with more recent versions of LLVM.

[1] https://bugs.llvm.org/show_bug.cgi?id=42338
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2020-11-25 20:28:34 UTC
This got fixed only in clang 9.0, but the change was rather too big to backport to 8.0. Since we still have 8.0 in 12.1-R, we should close this bug after it expires, e.g. 2021-01-31.
Comment 5 Dimitry Andric freebsd_committer freebsd_triage 2021-01-30 13:26:05 UTC
12.1-RELEASE expires 2021-01-31.