amd64 head -r317015 system clang 4.0 crashes during qt5-widgets "checking" activity: "Wrong prefetch hint in intrinsic: should be 0 or 1" (avx512.cpp)

From: Mark Millard <markmi_at_dsl-only.net>
Date: Sun, 16 Apr 2017 11:55:04 -0700
[ports -r438577 with devel/*binutils reverted to 2.27 via -r436731 .]

The qr5-widgets build attempt reported:

checking for avx512cd... 
clang++ -c -pipe -O2 -g -fstack-protector -fno-strict-aliasing -mavx512cd -g -Wall -W -fPIC -DAVX512WANT=CD -I. -I/usr/local/include -I/usr/local/lib/qt5/mkspecs/freebsd-clang -o avx512.o avx512.cpp
clang++  -o avx512 avx512.o   -L/usr/local/lib
avx512cd enabled.
checking for avx512pf... 
clang++ -c -pipe -O2 -g -fstack-protector -fno-strict-aliasing -mavx512pf -g -Wall -W -fPIC -DAVX512WANT=PF -I. -I/usr/local/include -I/usr/local/lib/qt5/mkspecs/freebsd-clang -o avx512.o avx512.cpp
Assertion failed: (HintVal < 2 && "Wrong prefetch hint in intrinsic: should be 0 or 1"), function LowerINTRINSIC_W_CHAIN, file /usr/src/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp, line 19956.
clang++: ESC[0;1;31merror: ESC[0munable to execute command: Abort trap (core dumped)ESC[0m
clang++: ESC[0;1;31merror: ESC[0mclang frontend command failed due to signal (use -v to see invocation)ESC[0m
FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin
clang++: ESC[0;1;30mnote: ESC[0mdiagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.ESC[0m
clang++: ESC[0;1;30mnote: ESC[0mdiagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:ESC[0m
clang++: ESC[0;1;30mnote: ESC[0mdiagnostic msg: /tmp/avx512-258133.cppESC[0m
clang++: ESC[0;1;30mnote: ESC[0mdiagnostic msg: /tmp/avx512-258133.shESC[0m
clang++: ESC[0;1;30mnote: ESC[0mdiagnostic msg: 

********************ESC[0m
*** Error code 254

Stop.
make[2]: stopped in /usr/obj/portswork/usr/ports/x11-toolkits/qt5-widgets/work/qtbase-opensource-src-5.7.1/config.tests/common/avx512


# more /tmp/avx512-258133.sh
# Crash reproducer for FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on LLVM 4.0.0)
# Driver args: "--driver-mode=g++" "-c" "-pipe" "-O2" "-g" "-fstack-protector" "-fno-strict-aliasing" "-mavx512pf" "-g" "-Wall" "-W" "-fPIC" "-D" "AVX512WANT=PF" "-I" "." "-I" "/usr/local/include" "-I" "/usr/local/lib/qt5/mkspecs/freebsd-clang" "-o" "avx512.o" "avx512.cpp"
# Original command:  "/usr/bin/clang++" "-cc1" "-triple" "x86_64-unknown-freebsd12.0" "-emit-obj" "-disable-free" "-main-file-name" "avx512.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim" "-relaxed-aliasing" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-target-feature" "+avx512pf" "-dwarf-column-info" "-debug-info-kind=standalone" "-dwarf-version=2" "-debugger-tuning=gdb" "-coverage-notes-file" "/usr/obj/portswork/usr/ports/x11-toolkits/qt5-widgets/work/qtbase-opensource-src-5.7.1/config.tests/common/avx512/avx512.gcno" "-resource-dir" "/usr/bin/../lib/clang/4.0.0" "-D" "AVX512WANT=PF" "-I" "." "-I" "/usr/local/include" "-I" "/usr/local/lib/qt5/mkspecs/freebsd-clang" "-internal-isystem" "/usr/include/c++/v1" "-O2" "-Wall" "-W" "-fdeprecated-macro" "-fdebug-compilation-dir" "/usr/obj/portswork/usr/ports/x11-toolkits/qt5-widgets/work/qtbase-opensource-src-5.7.1/config.tests/common/avx512" "-ferror-limit" "19" "-fmessage-length" "80" "-stack-protector" "1" "-fobjc-runtime=gnustep" "-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-o" "avx512.o" "-x" "c++" "avx512.cpp"
 "/usr/bin/clang++" "-cc1" "-triple" "x86_64-unknown-freebsd12.0" "-emit-obj" "-disable-free" "-main-file-name" "avx512.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mthread-model" "posix" "-mdisable-fp-elim" "-relaxed-aliasing" "-masm-verbose" "-mconstructor-aliases" "-munwind-tables" "-target-cpu" "x86-64" "-target-feature" "+avx512pf" "-dwarf-column-info" "-debug-info-kind=standalone" "-dwarf-version=2" "-debugger-tuning=gdb" "-coverage-notes-file" "/usr/obj/portswork/usr/ports/x11-toolkits/qt5-widgets/work/qtbase-opensource-src-5.7.1/config.tests/common/avx512/avx512.gcno" "-D" "AVX512WANT=PF" "-O2" "-Wall" "-W" "-fdeprecated-macro" "-ferror-limit" "19" "-fmessage-length" "80" "-stack-protector" "1" "-fobjc-runtime=gnustep" "-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-x" "c++" "avx512-258133.cpp"


Unfortunately the /tmp/avx512-258133.cpp is somewhat over
2 MiBytes and so it not appropriate here.

(Note: I got to this via trying to build x11/lumina .)



As for build environment details/oddities for my context:

# more /etc/make.conf 
WANT_QT_VERBOSE_CONFIGURE=1
#
DEFAULT_VERSIONS+=perl5=5.24
WRKDIRPREFIX=/usr/obj/portswork
#
# From a local /usr/ports/Mk/bsd.port.mk extension:
ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG=
#
.if ${.CURDIR:M*/devel/*llvm*}
#WITH_DEBUG=
.elif ${.CURDIR:M*/www/webkit-qt5*}
#WITH_DEBUG=
.else
WITH_DEBUG=
.endif
WITH_DEBUG_FILES=
MALLOC_PRODUCTION=

# svnlite diff /usr/ports/Mk/
Index: /usr/ports/Mk/bsd.port.mk
===================================================================
--- /usr/ports/Mk/bsd.port.mk	(revision 436747)
+++ /usr/ports/Mk/bsd.port.mk	(working copy)
_at__at_ -1646,7 +1646,11 _at__at_
 STRIP_CMD=	${TRUE}
 .endif
 DEBUG_FLAGS?=	-g
+.if defined(ALLOW_OPTIMIZATIONS_FOR_WITH_DEBUG)
+CFLAGS:=		${CFLAGS} ${DEBUG_FLAGS}
+.else
 CFLAGS:=		${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS}
+.endif
 .if defined(INSTALL_TARGET)
 INSTALL_TARGET:=	${INSTALL_TARGET:S/^install-strip$/install/g}
 .endif

# svnlite info /usr/ports/devel/binutils
Path: /usr/ports/devel/binutils
Working Copy Root Path: /usr/ports
URL: svn://svn0.us-west.freebsd.org/ports/head/devel/binutils
Relative URL: ^/head/devel/binutils
Repository Root: svn://svn0.us-west.freebsd.org/ports
Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
Revision: 436731
Node Kind: directory
Schedule: normal
Last Changed Author: bdrewery
Last Changed Rev: 434651
Last Changed Date: 2017-02-22 15:33:44 -0800 (Wed, 22 Feb 2017)

# svnlite diff /usr/src/contrib/llvm/
Index: /usr/src/contrib/llvm/tools/lld/ELF/Target.cpp
===================================================================
--- /usr/src/contrib/llvm/tools/lld/ELF/Target.cpp	(revision 315914)
+++ /usr/src/contrib/llvm/tools/lld/ELF/Target.cpp	(working copy)
_at__at_ -1070,7 +1070,8 _at__at_
 }
 
 PPC64TargetInfo::PPC64TargetInfo() {
-  PltRel = GotRel = R_PPC64_GLOB_DAT;
+  GotRel = R_PPC64_GLOB_DAT;
+  PltRel = R_PPC64_JMP_SLOT;
   RelativeRel = R_PPC64_RELATIVE;
   GotEntrySize = 8;
   GotPltEntrySize = 8;

(So TARGET_ARCH=powerpc64 tied.)



===
Mark Millard
markmi at dsl-only.net
Received on Sun Apr 16 2017 - 16:55:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:11 UTC