Subject: port-amd64/29332: kernel compilation failure with recent MAXDSIZ bump to 8GB
To: None <port-amd64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 02/11/2005 10:41:00
>Number: 29332
>Category: port-amd64
>Synopsis: kernel compilation failure with recent MAXDSIZ bump to 8GB
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-amd64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 11 10:41:00 +0000 2005
>Originator: Nicolas Joly
>Release: NetBSD 2.99.15 (-current 20050211)
>Organization:
Institut Pasteur, Paris.
>Environment:
System: NetBSD lanfeust.sis.pasteur.fr 2.99.15 NetBSD 2.99.15 (LANFEUST) #2: Wed Feb 9 19:12:39 CET 2005 njoly@lanfeust.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/LANFEUST amd64
Architecture: x86_64
Machine: amd64
>Description:
Since MAXDSIZ bump from 1GB to 8GB, i cannot compile a kernel anymore :
# compile LANFEUST/kern_resource.o
/local/src/NetBSD/tool/amd64/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffreestanding -g -O2 -fno-omit-frame-pointer -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -Damd64 -Dx86_64 -I. -I/local/src/NetBSD/src/sys/arch -I/local/src/NetBSD/src/sys -nostdinc -DLKM -DFFS_SNAPSHOT -DDIAGNOSTIC -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/local/src/NetBSD/src/sys/dist/ipf -c /local/src/NetBSD/src/sys/kern/kern_resource.c
/local/src/NetBSD/src/sys/kern/kern_resource.c:62: warning: integer overflow in expression
>How-To-Repeat:
cd src && ./build.sh -Uu -m amd64 kernel=LANFEUST
>Fix:
Index: sys/arch/amd64/include/vmparam.h
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/include/vmparam.h,v
retrieving revision 1.6
diff -u -r1.6 vmparam.h
--- sys/arch/amd64/include/vmparam.h 10 Feb 2005 10:42:04 -0000 1.6
+++ sys/arch/amd64/include/vmparam.h 11 Feb 2005 10:29:44 -0000
@@ -71,7 +71,7 @@
#define DFLDSIZ (256*1024*1024) /* initial data size limit */
#endif
#ifndef MAXDSIZ
-#define MAXDSIZ (8*1024*1024*1024) /* max data size */
+#define MAXDSIZ (8L*1024*1024*1024) /* max data size */
#endif
#ifndef DFLSSIZ
#define DFLSSIZ (2*1024*1024) /* initial stack size limit */