Clang segfaults on RPI3 in Alpha9 during buildworld

Mark Millard marklmi at yahoo.com
Wed Oct 17 17:18:30 UTC 2018



On 2018-Oct-17, at 8:31 AM, bob prohaska <fbsd at www.zefox.net> wrote:

> The last several attempts to build world on an RPI3 running 12.0-ALPHA9 r339305 GENERIC  arm64
> have stopped with:
> 
> --- Target/X86/X86LegalizerInfo.o ---
> c++  -target aarch64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/arm64.aarch64/tmp -B/usr/obj/usr/src/arm64.aarch64/
> tmp/usr/bin  -O2 -pipe -I/usr/obj/usr/src/arm64.aarch64/lib/clang/libllvm -I/usr/src/contrib/llvm/lib/Target/AArch64 -I
> /usr/src/contrib/llvm/lib/Target/ARM -I/usr/src/contrib/llvm/lib/Target/Mips -I/usr/src/contrib/llvm/lib/Target/PowerPC
> -I/usr/src/contrib/llvm/lib/Target/Sparc -I/usr/src/contrib/llvm/lib/Target/X86 -I/usr/src/lib/clang/include -I/usr/sr
> c/contrib/llvm/include -DLLVM_BUILD_GLOBAL_ISEL -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_DEFAULT_TARGET_TR
> IPLE=\"aarch64-unknown-freebsd12.0\" -DLLVM_HOST_TRIPLE=\"aarch64-unknown-freebsd12.0\" -DDEFAULT_SYSROOT=\"\" -DLLVM_T
> ARGET_ENABLE_AARCH64 -DLLVM_TARGET_ENABLE_ARM -DLLVM_TARGET_ENABLE_MIPS -DLLVM_TARGET_ENABLE_POWERPC -DLLVM_TARGET_ENAB
> LE_SPARC -DLLVM_TARGET_ENABLE_X86 -DLLVM_NATIVE_ASMPARSER=LLVMInitializeAArch64AsmParser -DLLVM_NATIVE_ASMPRINTER=LLVMI
> nitializeAArch64AsmPrinter -DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeAArch64Disassembler -DLLVM_NATIVE_TARGET=LLVMInitia
> lizeAArch64Target -DLLVM_NATIVE_TARGETINFO=LLVMInitializeAArch64TargetInfo -DLLVM_NATIVE_TARGETMC=LLVMInitializeAArch64
> TargetMC -ffunction-sections -fdata-sections -gline-tables-only -MD -MF.depend.Target_X86_X86LegalizerInfo.o -MTTarget/
> X86/X86LegalizerInfo.o -fstack-protector-strong -Qunused-arguments  -std=c++11 -fno-exceptions -fno-rtti -gline-tables-
> only -stdlib=libc++ -Wno-c++11-extensions  -c /usr/src/contrib/llvm/lib/Target/X86/X86LegalizerInfo.cpp -o Target/X86/X
> 86LegalizerInfo.o
> --- Target/X86/X86ISelDAGToDAG.o ---
> c++: error: unable to execute command: Segmentation fault (core dumped)
> c++: error: clang frontend command failed due to signal (use -v to see invocation)
> FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
> Target: aarch64-unknown-freebsd12.0
> Thread model: posix
> InstalledDir: /usr/bin
> 
> So far I'm stuck, is there a workaround? So far I've tried compiling kernel-toolchain and
> updating the kernel alone, but that didn't seem to help.
> 

When clang fails it sometimes produces text like:

cc: 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.
cc: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/control-696205.c
cc: note: diagnostic msg: /tmp/control-696205.sh
cc: note: diagnostic msg: 

********************
*** [control.lo] Error code 1


The .c and .sh files are intended to help reproduce the problem
without being part of a grander operation like buildworld. (The
names of the .c and .h vary from run to run.)

Did your example produce such messages? If yes, you may want to
provide some sort of access to the files. if no, you may want
to report that.

Sometimes the .c is big enough to justify compression if it is to
go into, say, a FreeBSD bugzilla submittal. Some people bundle
the two files into one compressed file.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-arm mailing list