Date: Thu, 20 Sep 2018 13:03:44 -0700 From: Mark Millard <marklmi@yahoo.com> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org> Subject: devel/xtoolchain-llvm70 based buildkernel for head -r338675 fails: if_fxp.c:1630:3: error: array index -1 is before the beginning of the array Message-ID: <BFBCB257-4B45-4196-9FCE-29418688E60E@yahoo.com>
next in thread | raw e-mail | index | archive | help
This was targeting amd64. --- if_fxp.o --- /usr/src/sys/dev/fxp/if_fxp.c:1630:3: error: array index -1 is before = the beginning of the array [-Werror,-Warray-bounds] cbp->tbd[-1].tb_size =3D htole32(m->m_pkthdr.tso_segsz = << 16); ^ ~~ /usr/src/sys/dev/fxp/if_fxpreg.h:297:3: note: array 'tbd' declared here struct fxp_tbd tbd[FXP_NTXSEG + 1]; ^ 1 error generated. *** [if_fxp.o] Error code 1 make[4]: stopped in /usr/src/sys/modules/fxp .ERROR_TARGET=3D'if_fxp.o' = .ERROR_META_FILE=3D'/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd= 64.amd64/sys/GENERIC-NODBG/modules/usr/src/sys/modules/fxp/if_fxp.o.meta' .MAKE.LEVEL=3D'4' MAKEFILE=3D'' .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes = verbose' _ERROR_CMD=3D'/usr/local/bin/clang70 -target x86_64-unknown-freebsd12.0 = --sysroot=3D/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64= /tmp -B/var/empty -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL = -DKLD_MODULE -DKLD_TIED -nostdinc -DHAVE_KERNEL_OPTION_HEADERS = -include = /usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC= -NODBG/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include = -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer = -I/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENER= IC-NODBG -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse = -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwrapv = -fstack-protector -gdwarf-2 -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-tautological-compare -Wno-error-empty-body = -Wno-error-parentheses-equality -Wno-error-unused-function = -Wno-error-pointer-sign -Wno-error-shift-negative-value = -Wno-address-of-packed-member -mno-aes -mno-avx -std=3Diso9899:1999 -c = /usr/src/sys/dev/fxp/if_fxp.c -o if_fxp.o; ctfconvert -L VERSION -g = if_fxp.o;' .CURDIR=3D'/usr/src/sys/modules/fxp' .MAKE=3D'make' = .OBJDIR=3D'/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/= sys/GENERIC-NODBG/modules/usr/src/sys/modules/fxp' .TARGETS=3D'all' DESTDIR=3D'' LD_LIBRARY_PATH=3D'' MACHINE=3D'amd64' MACHINE_ARCH=3D'amd64' = MAKEOBJDIRPREFIX=3D'/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd= 64.amd64/sys/GENERIC-NODBG/modules' MAKESYSPATH=3D'/usr/src/share/mk' MAKE_VERSION=3D'20180512' = PATH=3D'/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/tmp= /legacy/usr/sbin:/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.= amd64/tmp/legacy/usr/bin:/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/sr= c/amd64.amd64/tmp/legacy/bin:/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/us= r/src/amd64.amd64/tmp/usr/sbin:/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/= usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin' SRCTOP=3D'/usr/src' = OBJTOP=3D'/usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/s= ys/GENERIC-NODBG/modules/usr/src' .MAKE.MAKEFILES=3D'/usr/src/share/mk/sys.mk = /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk = /root/src.configs/src.conf.amd64-xtoolchain-llvm.amd64-host = /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/src.sys.obj.mk = /usr/src/share/mk/auto.obj.mk /usr/src/share/mk/bsd.suffixes.mk = /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk = /usr/src/share/mk/src.sys.mk /dev/null /usr/src/sys/modules/fxp/Makefile = /usr/src/share/mk/bsd.kmod.mk /usr/src/sys/conf/kmod.mk = /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/bsd.opts.mk = /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/local.init.mk = /usr/src/share/mk/src.init.mk /usr/src/sys/modules/fxp/../Makefile.inc = /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.compiler.mk = /usr/src/share/mk/bsd.linker.mk /usr/src/sys/conf/kern.opts.mk = /usr/src/sys/conf/config.mk /usr/src/share/mk/bsd.links.mk = /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk = /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk = /usr/src/sys/conf/kern.mk' .PATH=3D'. /usr/src/sys/modules/fxp /usr/src/sys/dev/fxp = /usr/obj/amd64_xtoolchain-llvm/amd64.amd64/usr/src/amd64.amd64/sys/GENERIC= -NODBG' 1 error /usr/src/sys/dev/fxp/if_fxpreg.h:297 is in: struct fxp_cb_tx { uint16_t cb_status; uint16_t cb_command; uint32_t link_addr; uint32_t tbd_array_addr; uint16_t byte_count; uint8_t tx_threshold; uint8_t tbd_number; =20 /* * The following structure isn't actually part of the TxCB, * unless the extended TxCB feature is being used. In this * case, the first two elements of the structure below are * fetched along with the TxCB. */ union { struct fxp_ipcb ipcb; struct fxp_tbd tbd[FXP_NTXSEG + 1]; } tx_cb_u; }; /usr/src/sys/dev/fxp/if_fxp.c:1630 is in: /* Configure TSO. */ if (m->m_pkthdr.csum_flags & CSUM_TSO) { cbp->tbd[-1].tb_size =3D htole32(m->m_pkthdr.tso_segsz = << 16); cbp->tbd[1].tb_size |=3D htole32(tcp_payload << 16); cbp->ipcb_ip_schedule |=3D FXP_IPCB_LARGESEND_ENABLE | FXP_IPCB_IP_CHECKSUM_ENABLE | FXP_IPCB_TCP_PACKET | FXP_IPCB_TCPUDP_CHECKSUM_ENABLE; } =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BFBCB257-4B45-4196-9FCE-29418688E60E>