Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jul 2021 14:41:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 257132] clang 12.0.1 fails to cross-compile kern_mbuf - amd64 host, i386 target
Message-ID:  <bug-257132-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D257132

            Bug ID: 257132
           Summary: clang 12.0.1 fails to cross-compile kern_mbuf - amd64
                    host, i386 target
           Product: Base System
           Version: CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: imb@protected-networks.net

When cross-building for i386 target on amd64, clang 12.0.1 trips over an
assertion:

Assertion failed: ((EltVT.getSizeInBits() >=3D 64 || (uint64_t)((int64_t)Va=
l >>
EltVT.getSizeInBits()) + 1 < 2) && "getConstant with a uint64_t value that
doesn't fit in the type!"), function getConstant, file
/usr/local/release-builds/i386/usr/src/contrib/llvm-project/llvm/lib/CodeGe=
n/SelectionDAG/SelectionDAG.cpp,
line 1337.
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: cc -target i386-unknown-freebsd14.0
--sysroot=3D/usr/obj/usr/src/i386.i386/tmp
-B/usr/obj/usr/src/i386.i386/tmp/usr/bin -c -O2 -pipe -fno-strict-aliasing
-nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include
-I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inclu=
de
opt_global.h -fno-common -MD -MF.depend.kern_mbuf.o -MTkern_mbuf.o
-fdebug-prefix-map=3D./machine=3D/usr/src/sys/i386/include
-fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include -mno-mmx -mno-sse
-msoft-float -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-dec=
ls
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__
-Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error=3Dtautological-compare -Wno-error=3Dempty-body
-Wno-error=3Dparentheses-equality -Wno-error=3Dunused-function
-Wno-error=3Dpointer-sign -Wno-error=3Dshift-negative-value
-Wno-address-of-packed-member -Wno-format-zero-length -mno-aes -mno-avx
-std=3Diso9899:1999 -Werror /usr/src/sys/kern/kern_mbuf.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'/usr/src/sys/kern/kern_mbuf.c'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@m_f=
ree'
#0 0x00000000047256d1 PrintStackTrace
/usr/local/release-builds/i386/usr/src/contrib/llvm-project/llvm/lib/Suppor=
t/Unix/Signals.inc:565:13
#1 0x00000000047238a5 RunSignalHandlers
/usr/local/release-builds/i386/usr/src/contrib/llvm-project/llvm/lib/Suppor=
t/Signals.cpp:72:18
#2 0x00000000046bd49e HandleCrash
/usr/local/release-builds/i386/usr/src/contrib/llvm-project/llvm/lib/Suppor=
t/CrashRecoveryContext.cpp:75:5
#3 0x00000000046bd623 CrashRecoverySignalHandler
/usr/local/release-builds/i386/usr/src/contrib/llvm-project/llvm/lib/Suppor=
t/CrashRecoveryContext.cpp:0:51
#4 0x0000000805d03eb0 handle_signal
/usr/local/release-builds/i386/usr/src/lib/libthr/thread/thr_sig.c:0:3
cc: error: clang frontend command failed with exit code 134 (use -v to see
invocation)
FreeBSD clang version 12.0.1 (git@github.com:llvm/llvm-project.git
llvmorg-12.0.1-rc2-0-ge7dac564cd0e)
Target: i386-unknown-freebsd14.0
Thread model: posix
InstalledDir: /usr/bin
cc: note: diagnostic msg:=20
********************

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/kern_mbuf-e8afab.c
cc: note: diagnostic msg: /tmp/kern_mbuf-e8afab.sh
cc: note: diagnostic msg:=20

preprocessed source (as above) attached
shell script (as above) contains:

# Crash reproducer for FreeBSD clang version 12.0.1
(git@github.com:llvm/llvm-project.git llvmorg-12.0.1-rc2-0-ge7dac564cd0e)
# Driver args: "--target=3Di386-unknown-freebsd14.0"
"--sysroot=3D/usr/obj/usr/src/i386.i386/tmp" "-B"
"/usr/obj/usr/src/i386.i386/tmp/usr/bin" "-c" "-O2" "-pipe"
"-fno-strict-aliasing" "-nostdinc" "-I" "." "-I" "/usr/src/sys" "-I"
"/usr/src/sys/contrib/ck/include" "-I" "/usr/src/sys/contrib/libfdt" "-D"
"_KERNEL" "-D" "HAVE_KERNEL_OPTION_HEADERS" "-include" "opt_global.h"
"-fno-common" "-MD" "-MF" ".depend.kern_mbuf.o" "-MT" "kern_mbuf.o"
"-fdebug-prefix-map=3D./machine=3D/usr/src/sys/i386/include"
"-fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include" "-mno-mmx" "-mno-ss=
e"
"-msoft-float" "-ffreestanding" "-fwrapv" "-fstack-protector" "-Wall"
"-Wredundant-decls" "-Wnested-externs" "-Wstrict-prototypes"
"-Wmissing-prototypes" "-Wpointer-arith" "-Wcast-qual" "-Wundef"
"-Wno-pointer-sign" "-D" "__printf__=3D__freebsd_kprintf__"
"-Wmissing-include-dirs" "-fdiagnostics-show-option" "-Wno-unknown-pragmas"
"-Wno-error=3Dtautological-compare" "-Wno-error=3Dempty-body"
"-Wno-error=3Dparentheses-equality" "-Wno-error=3Dunused-function"
"-Wno-error=3Dpointer-sign" "-Wno-error=3Dshift-negative-value"
"-Wno-address-of-packed-member" "-Wno-format-zero-length" "-mno-aes" "-mno-=
avx"
"-std=3Diso9899:1999" "-Werror" "/usr/src/sys/kern/kern_mbuf.c"
# Original command:  "/usr/bin/cc" "-cc1" "-triple" "i386-unknown-freebsd14=
.0"
"-emit-obj" "--mrelax-relocations" "-disable-free" "-main-file-name"
"kern_mbuf.c" "-mrelocation-model" "static" "-mframe-pointer=3Dall"
"-relaxed-aliasing" "-fno-rounding-math" "-mconstructor-aliases"
"-ffreestanding" "-target-cpu" "i686" "-target-feature" "-mmx"
"-target-feature" "-sse" "-target-feature" "-aes" "-target-feature" "-avx"
"-no-implicit-float" "-tune-cpu" "generic" "-fno-split-dwarf-inlining"
"-debugger-tuning=3Dgdb" "-nostdsysteminc" "-nobuiltininc" "-resource-dir"
"/usr/lib/clang/12.0.1" "-dependency-file" ".depend.kern_mbuf.o" "-MT"
"kern_mbuf.o" "-sys-header-deps" "-include" "opt_global.h" "-I" "." "-I"
"/usr/src/sys" "-I" "/usr/src/sys/contrib/ck/include" "-I"
"/usr/src/sys/contrib/libfdt" "-D" "_KERNEL" "-D" "HAVE_KERNEL_OPTION_HEADE=
RS"
"-D" "__printf__=3D__freebsd_kprintf__" "-isysroot"
"/usr/obj/usr/src/i386.i386/tmp" "-O2" "-Wall" "-Wredundant-decls"
"-Wnested-externs" "-Wstrict-prototypes" "-Wmissing-prototypes"
"-Wpointer-arith" "-Wcast-qual" "-Wundef" "-Wno-pointer-sign"
"-Wmissing-include-dirs" "-Wno-unknown-pragmas"
"-Wno-error=3Dtautological-compare" "-Wno-error=3Dempty-body"
"-Wno-error=3Dparentheses-equality" "-Wno-error=3Dunused-function"
"-Wno-error=3Dpointer-sign" "-Wno-error=3Dshift-negative-value"
"-Wno-address-of-packed-member" "-Wno-format-zero-length" "-Werror"
"-std=3Diso9899:1999" "-fdebug-compilation-dir"
"/usr/obj/usr/src/i386.i386/sys/SARAH"
"-fdebug-prefix-map=3D./machine=3D/usr/src/sys/i386/include"
"-fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include" "-ferror-limit" "19"
"-fwrapv" "-stack-protector" "1" "-fgnuc-version=3D4.2.1" "-vectorize-loops"
"-vectorize-slp" "-faddrsig" "-o" "kern_mbuf.o" "-x" "c"
"/usr/src/sys/kern/kern_mbuf.c"
 "/usr/bin/cc" "-cc1" "-triple" "i386-unknown-freebsd14.0" "-emit-obj"
"--mrelax-relocations" "-disable-free" "-main-file-name" "kern_mbuf.c"
"-mrelocation-model" "static" "-mframe-pointer=3Dall" "-relaxed-aliasing"
"-fno-rounding-math" "-mconstructor-aliases" "-ffreestanding" "-target-cpu"
"i686" "-target-feature" "-mmx" "-target-feature" "-sse" "-target-feature"
"-aes" "-target-feature" "-avx" "-no-implicit-float" "-tune-cpu" "generic"
"-fno-split-dwarf-inlining" "-debugger-tuning=3Dgdb" "-nostdsysteminc"
"-nobuiltininc" "-sys-header-deps" "-D" "_KERNEL" "-D"
"HAVE_KERNEL_OPTION_HEADERS" "-D" "__printf__=3D__freebsd_kprintf__" "-O2"
"-Wall" "-Wredundant-decls" "-Wnested-externs" "-Wstrict-prototypes"
"-Wmissing-prototypes" "-Wpointer-arith" "-Wcast-qual" "-Wundef"
"-Wno-pointer-sign" "-Wmissing-include-dirs" "-Wno-unknown-pragmas"
"-Wno-error=3Dtautological-compare" "-Wno-error=3Dempty-body"
"-Wno-error=3Dparentheses-equality" "-Wno-error=3Dunused-function"
"-Wno-error=3Dpointer-sign" "-Wno-error=3Dshift-negative-value"
"-Wno-address-of-packed-member" "-Wno-format-zero-length" "-Werror"
"-std=3Diso9899:1999" "-fdebug-prefix-map=3D./machine=3D/usr/src/sys/i386/i=
nclude"
"-fdebug-prefix-map=3D./x86=3D/usr/src/sys/x86/include" "-ferror-limit" "19"
"-fwrapv" "-stack-protector" "1" "-fgnuc-version=3D4.2.1" "-vectorize-loops"
"-vectorize-slp" "-faddrsig" "-x" "c" "kern_mbuf-e8afab.c"

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-257132-227>