Bug 264157 - clang-13 crashes while compiling tests from devel/vc
Summary: clang-13 crashes while compiling tests from devel/vc
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 13.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-toolchain (Nobody)
URL: https://github.com/llvm/llvm-project/...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-22 20:33 UTC by Yuri Victorovich
Modified: 2022-05-23 02:17 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2022-05-22 20:33:35 UTC
See details in the llvm bug (see URL).

FreeBSD 13.1-STABLE
Comment 1 Mark Millard 2022-05-23 02:17:44 UTC
(In reply to Yuri Victorovich from comment #0)

This gives a little bit of local information about
the specific error from my trying the reproducer.
My information has backtraces as I build even non-debug
style without stripping symbols.

Relative to potential llvm14 status, it reports:

error: unknown argument: '-munwind-tables'

On 13.1, using its llvm13 context, I see things like:

# . ./scalaraccess-7a4b7b.sh
/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/scalaraccess.cpp:33:1: error: SSE2 register return with SSE2 disabled
TEST_TYPES(V, reads, concat<AllVectors, SimdArrayList>)
^
. . .

There are a bunch. It eventually gets:

template <typename V, size_t Index> inline void readsConstantIndexTest(V a, V b)
                                                ^
/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/scalaraccess.cpp:70:49: error: SSE2 register return with SSE2 disabled
/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/scalaraccess.cpp:70:49: error: SSE2 register return with SSE2 disabled
/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/scalaraccess.cpp:70:49: error: SSE2 register return with SSE2 disabled
/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/scalaraccess.cpp:70:49: error: SSE2 register return with SSE2 disabled
/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/scalaraccess.cpp:70:49: error: SSE2 register return with SSE2 disabled
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /usr/bin/c++ -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name scalaraccess.cpp -mrelocation-model static -mframe-pointer=all -relaxed-aliasing -ffp-contract=fast -fno-rounding-math -mfpmath sse -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-feature -sse2 -target-feature -sse3 -target-feature -ssse3 -target-feature -sse4.1 -target-feature -sse4.2 -target-feature -sse4a -target-feature -avx -target-feature -fma -target-feature -bmi2 -target-feature -avx2 -target-feature -xop -target-feature -fma4 -target-feature -avx512f -target-feature -avx512vl -target-feature -avx512pf -target-feature -avx512er -target-feature -avx512cd -target-feature -avx512dq -target-feature -avx512bw -target-feature -avx512ifma -target-feature -avx512vbmi -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/disk-samsung/freebsd-ports/devel/vc/work/.build -sys-header-deps -D COMPILE_FOR_UNIT_TESTS -D HAVE_CXX_ABI_H -D TESTDATA_DIR=\"/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/testdata/\" -D Vc_IMPL=Scalar -O2 -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare -Wno-local-type-template-args -Wno-unnamed-type-template-args -std=c++14 -fdeprecated-macro -fdebug-compilation-dir=/disk-samsung/freebsd-ports/devel/vc/work/.build -ftemplate-depth 128 -ferror-limit 19 -stack-protector 2 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c++ scalaraccess-7a4b7b.cpp
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'scalaraccess-7a4b7b.cpp'.
4.	Running pass 'X86 FP Stackifier' on function '@_Z22readsConstantIndexTestIN4Vc_16VectorIdNS0_9VectorAbi6ScalarEEELm0EEvT_S5_'
 #0 0x00000000048a7860 PrintStackTrace /usr/13_1R-src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:13
 #1 0x00000000048a5cd5 RunSignalHandlers /usr/13_1R-src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:98:18
 #2 0x00000000048a7f70 SignalHandler /usr/13_1R-src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
 #3 0x00000008289875b0 handle_signal /usr/13_1R-src/lib/libthr/thread/thr_sig.c:0:3
 #4 0x0000000828986b6f thr_sighandler /usr/13_1R-src/lib/libthr/thread/thr_sig.c:247:1
 #5 0x00007fffffffe2d3 ([vdso]+0x2d3)
 #6 0x00000000053aca70 handleSpecialFP /usr/13_1R-src/contrib/llvm-project/llvm/lib/Target/X86/X86FloatingPoint.cpp:1514:19
 #7 0x00000000053aca70 processBasicBlock /usr/13_1R-src/contrib/llvm-project/llvm/lib/Target/X86/X86FloatingPoint.cpp:462:29
 #8 0x00000000053ab26c runOnMachineFunction /usr/13_1R-src/contrib/llvm-project/llvm/lib/Target/X86/X86FloatingPoint.cpp:375:13
 #9 0x00000000041578ee runOnFunction /usr/13_1R-src/contrib/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:13
#10 0x0000000004538353 runOnFunction /usr/13_1R-src/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1439:27
#11 0x000000000453e253 runOnModule /usr/13_1R-src/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1485:13
#12 0x0000000004538929 runOnModule /usr/13_1R-src/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:0:27
#13 0x0000000004538929 run /usr/13_1R-src/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:542:44
#14 0x000000000294294a EmitAssemblyWithNewPassManager /usr/13_1R-src/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1501:3
#15 0x000000000293d87e EmitBackendOutput /usr/13_1R-src/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:0:15
#16 0x0000000002bf955f reset /usr/obj/BUILDs/13_1R-amd64-nodbg-clang/usr/13_1R-src/amd64.amd64/tmp/usr/include/c++/v1/__memory/unique_ptr.h:315:28
#17 0x0000000002bf955f ~unique_ptr /usr/obj/BUILDs/13_1R-amd64-nodbg-clang/usr/13_1R-src/amd64.amd64/tmp/usr/include/c++/v1/__memory/unique_ptr.h:272:19
#18 0x0000000002bf955f HandleTranslationUnit /usr/13_1R-src/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:334:7
#19 0x0000000003030e34 begin /usr/obj/BUILDs/13_1R-amd64-nodbg-clang/usr/13_1R-src/amd64.amd64/tmp/usr/include/c++/v1/vector:1539:30
#20 0x0000000003030e34 finalize<std::__1::vector<std::__1::unique_ptr<clang::TemplateInstantiationCallback, std::__1::default_delete<clang::TemplateInstantiationCallback> >, std::__1::allocator<std::__1::unique_ptr<clang::TemplateInstantiationCallback, std::__1::default_delete<clang::TemplateInstantiationCallback> > > > > /usr/13_1R-src/contrib/llvm-project/clang/include/clang/Sema/TemplateInstCallback.h:54:16
#21 0x0000000003030e34 ParseAST /usr/13_1R-src/contrib/llvm-project/clang/lib/Parse/ParseAST.cpp:178:3
#22 0x0000000002b509b6 Execute /usr/13_1R-src/contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp:955:10
#23 0x0000000002ad68e6 getPtr /usr/13_1R-src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:274:42
#24 0x0000000002ad68e6 operator bool /usr/13_1R-src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:236:16
#25 0x0000000002ad68e6 ExecuteAction /usr/13_1R-src/contrib/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:974:23
#26 0x0000000002bf3827 ExecuteCompilerInvocation /usr/13_1R-src/contrib/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:278:25
#27 0x0000000002215070 cc1_main /usr/13_1R-src/contrib/llvm-project/clang/tools/driver/cc1_main.cpp:246:15
#28 0x0000000002221ac5 ExecuteCC1Tool /usr/13_1R-src/contrib/llvm-project/clang/tools/driver/driver.cpp:338:12
Segmentation fault (core dumped)


For stlcontainer-4e1702 it is similar and the backtrace looks like:

. ./stlcontainer-4e1702.sh
. . .
/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/stlcontainer.cpp:74:6: error: SSE2 register return with SSE2 disabled
In file included from /disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/stlcontainer.cpp:24:
In file included from /disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/unittest.h:30:
In file included from /disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/virtest/vir/test.h:34:
/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/virtest/vir/detail/ulp.h:93:32: error: SSE2 register return with SSE2 disabled
template <typename T> inline T ulpDiffToReferenceSigned(const T &_val, const T &_ref)
                               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /usr/bin/c++ -cc1 -triple x86_64-unknown-freebsd13.1 -emit-obj --mrelax-relocations -disable-free -disable-llvm-verifier -discard-value-names -main-file-name stlcontainer.cpp -mrelocation-model static -mframe-pointer=all -relaxed-aliasing -ffp-contract=fast -fno-rounding-math -mfpmath sse -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-feature -sse2 -target-feature -sse3 -target-feature -ssse3 -target-feature -sse4.1 -target-feature -sse4.2 -target-feature -sse4a -target-feature -avx -target-feature -fma -target-feature -bmi2 -target-feature -avx2 -target-feature -xop -target-feature -fma4 -target-feature -avx512f -target-feature -avx512vl -target-feature -avx512pf -target-feature -avx512er -target-feature -avx512cd -target-feature -avx512dq -target-feature -avx512bw -target-feature -avx512ifma -target-feature -avx512vbmi -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/disk-samsung/freebsd-ports/devel/vc/work/.build -sys-header-deps -D COMPILE_FOR_UNIT_TESTS -D HAVE_CXX_ABI_H -D TESTDATA_DIR=\"/disk-samsung/freebsd-ports/devel/vc/work/Vc-1.4.3/tests/testdata/\" -D Vc_IMPL=Scalar -O2 -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare -Wno-local-type-template-args -Wno-unnamed-type-template-args -std=c++14 -fdeprecated-macro -fdebug-compilation-dir=/disk-samsung/freebsd-ports/devel/vc/work/.build -ftemplate-depth 128 -ferror-limit 19 -stack-protector 2 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -x c++ stlcontainer-4e1702.cpp
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module 'stlcontainer-4e1702.cpp'.
4.	Running pass 'X86 FP Stackifier' on function '@_ZZN5Tests12simdForEach_IN4Vc_16VectorIdNS1_9VectorAbi6ScalarEEEE3runEvENKUlT_E_clIS5_EEDaS7_'
 #0 0x00000000048a7860 PrintStackTrace /usr/13_1R-src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:565:13
 #1 0x00000000048a5cd5 RunSignalHandlers /usr/13_1R-src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:98:18
 #2 0x00000000048a7f70 SignalHandler /usr/13_1R-src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:3
 #3 0x0000000827d3f5b0 handle_signal /usr/13_1R-src/lib/libthr/thread/thr_sig.c:0:3
 #4 0x0000000827d3eb6f thr_sighandler /usr/13_1R-src/lib/libthr/thread/thr_sig.c:247:1
 #5 0x00007fffffffe2d3 ([vdso]+0x2d3)
 #6 0x00000000053aca70 handleSpecialFP /usr/13_1R-src/contrib/llvm-project/llvm/lib/Target/X86/X86FloatingPoint.cpp:1514:19
 #7 0x00000000053aca70 processBasicBlock /usr/13_1R-src/contrib/llvm-project/llvm/lib/Target/X86/X86FloatingPoint.cpp:462:29
 #8 0x00000000053ab26c runOnMachineFunction /usr/13_1R-src/contrib/llvm-project/llvm/lib/Target/X86/X86FloatingPoint.cpp:375:13
 #9 0x00000000041578ee runOnFunction /usr/13_1R-src/contrib/llvm-project/llvm/lib/CodeGen/MachineFunctionPass.cpp:0:13
#10 0x0000000004538353 runOnFunction /usr/13_1R-src/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1439:27
#11 0x000000000453e253 runOnModule /usr/13_1R-src/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:1485:13
#12 0x0000000004538929 runOnModule /usr/13_1R-src/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:0:27
#13 0x0000000004538929 run /usr/13_1R-src/contrib/llvm-project/llvm/lib/IR/LegacyPassManager.cpp:542:44
#14 0x000000000294294a EmitAssemblyWithNewPassManager /usr/13_1R-src/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:1501:3
#15 0x000000000293d87e EmitBackendOutput /usr/13_1R-src/contrib/llvm-project/clang/lib/CodeGen/BackendUtil.cpp:0:15
#16 0x0000000002bf955f reset /usr/obj/BUILDs/13_1R-amd64-nodbg-clang/usr/13_1R-src/amd64.amd64/tmp/usr/include/c++/v1/__memory/unique_ptr.h:315:28
#17 0x0000000002bf955f ~unique_ptr /usr/obj/BUILDs/13_1R-amd64-nodbg-clang/usr/13_1R-src/amd64.amd64/tmp/usr/include/c++/v1/__memory/unique_ptr.h:272:19
#18 0x0000000002bf955f HandleTranslationUnit /usr/13_1R-src/contrib/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:334:7
#19 0x0000000003030e34 begin /usr/obj/BUILDs/13_1R-amd64-nodbg-clang/usr/13_1R-src/amd64.amd64/tmp/usr/include/c++/v1/vector:1539:30
#20 0x0000000003030e34 finalize<std::__1::vector<std::__1::unique_ptr<clang::TemplateInstantiationCallback, std::__1::default_delete<clang::TemplateInstantiationCallback> >, std::__1::allocator<std::__1::unique_ptr<clang::TemplateInstantiationCallback, std::__1::default_delete<clang::TemplateInstantiationCallback> > > > > /usr/13_1R-src/contrib/llvm-project/clang/include/clang/Sema/TemplateInstCallback.h:54:16
#21 0x0000000003030e34 ParseAST /usr/13_1R-src/contrib/llvm-project/clang/lib/Parse/ParseAST.cpp:178:3
#22 0x0000000002b509b6 Execute /usr/13_1R-src/contrib/llvm-project/clang/lib/Frontend/FrontendAction.cpp:955:10
#23 0x0000000002ad68e6 getPtr /usr/13_1R-src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:274:42
#24 0x0000000002ad68e6 operator bool /usr/13_1R-src/contrib/llvm-project/llvm/include/llvm/Support/Error.h:236:16
#25 0x0000000002ad68e6 ExecuteAction /usr/13_1R-src/contrib/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:974:23
#26 0x0000000002bf3827 ExecuteCompilerInvocation /usr/13_1R-src/contrib/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:278:25
#27 0x0000000002215070 cc1_main /usr/13_1R-src/contrib/llvm-project/clang/tools/driver/cc1_main.cpp:246:15
#28 0x0000000002221ac5 ExecuteCC1Tool /usr/13_1R-src/contrib/llvm-project/clang/tools/driver/driver.cpp:338:12
Segmentation fault (core dumped)