Bug 222280 - www/firefox: 57.0 crashes clang during build
Summary: www/firefox: 57.0 crashes clang 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 Some People
Assignee: Dimitry Andric
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2017-09-13 10:36 UTC by Jan Beich
Modified: 2022-06-22 07:55 UTC (History)
3 users (show)

See Also:


Attachments
mfbt/Compression.cpp (preprocessed, compressed) (203.54 KB, application/x-xz)
2017-09-13 10:36 UTC, Jan Beich
no flags Details
command line args (for clang 5.0) (4.99 KB, text/plain)
2017-09-13 10:37 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 2017-09-13 10:36:00 UTC
/usr/bin/c++ -std=gnu++11 -o Compression.o -c -Iobj-x86_64-unknown-freebsd12.0/dist/system_wrappers -include config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DIMPL_MFBT -Imfbt -Iobj-x86_64-unknown-freebsd12.0/mfbt  -Iobj-x86_64-unknown-freebsd12.0/dist/include  -Iobj-x86_64-unknown-freebsd12.0/dist/include/nspr -Iobj-x86_64-unknown-freebsd12.0/dist/include/nss       -fPIC  -DMOZILLA_CLIENT -include obj-x86_64-unknown-freebsd12.0/mozilla-config.h -MD -MP -MF .deps/Compression.o.pp -Qunused-arguments    -I/usr/local/include -Qunused-arguments -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wloop-analysis -Wc++11-compat-pedantic -Wc++14-compat -Wc++14-compat-pedantic -Wc++1z-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wno-gnu-zero-variadic-macro-arguments -Wformat-security -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pipe  -O -fno-omit-frame-pointer   -Wno-error=shadow  -Wno-unused-function mfbt/Compression.cpp
Assertion failed: (!Old || Old->getCachedLinkage() == D->getCachedLinkage()), function getLVForDecl, file /usr/src/contrib/llvm/tools/clang/lib/AST/Decl.cpp, line 1434.
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 5.0.0 (tags/RELEASE_500/final 312559) (based on LLVM 5.0.0svn)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

Regressed by: https://hg.mozilla.org/mozilla-central/rev/9a4077eda5d8
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-09-13 10:36:56 UTC
Created attachment 186324 [details]
mfbt/Compression.cpp (preprocessed, compressed)
Comment 2 Jan Beich freebsd_committer freebsd_triage 2017-09-13 10:37:46 UTC
Created attachment 186325 [details]
command line args (for clang 5.0)
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-09-13 10:41:45 UTC
Reproducible on Clang 4.0 and 3.9.
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2017-09-13 16:34:28 UTC
This can be reduced to just:

// clang -cc1 -triple x86_64 -S bug222280.cpp
namespace {
  extern "C" union LZ4_stream_u *LZ4_createStream();
  LZ4_stream_u *LZ4_createStream();
}

It's apparently a long-standing problem upstream, as there are multiple bugs about it, but no conclusive fix:

https://bugs.llvm.org/show_bug.cgi?id=18964
https://bugs.llvm.org/show_bug.cgi?id=19995
https://bugs.llvm.org/show_bug.cgi?id=21854
https://bugs.llvm.org/show_bug.cgi?id=23090
https://bugs.llvm.org/show_bug.cgi?id=33503

I'll see if I can get some movement on this upstream, and close off a bunch of duplicates.