Subject: kern/23524: Kernel segfaults with -Oxx and -march flags on p200mmx with gcc3x
To: None <gnats-bugs@gnats.netbsd.org>
From: None <pancake@panser.panser>
List: netbsd-bugs
Date: 11/21/2003 18:48:30
>Number: 23524
>Category: kern
>Synopsis: Kernel segfaults with -Oxx and -march flags on p200mmx with gcc3x
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Nov 21 17:39:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:
>Release: NetBSD 1.6ZF
>Organization:
no org =)
>Environment:
System: NetBSD panser 1.6ZF NetBSD 1.6ZF (PANCAKE-PANSER-SERVER) #20: Fri Nov 21 00:27:00 CET 2003 root@panser:/usr/src/sys/arch/i386/compile/PANCAKE_PANSER i386
Architecture: i386
Machine: i386
>Description:
In my p200mmx box I build the ZF kernel with gcc3.3.2 with -O3 and -march=
i586 flags, then I reboot the box, and after load the kernel in ram,
machine reboots O_O
After that I rebuild a new kernel with -Os, with this kernel boots ok, but
when take use of UVM code (compiling...) segfaults on UVM code and
reboots. Finally I build the kernel with CFLAGS="" and all goes well.
I know that using build.sh it doesn't happend, but I haven't got enought
disk-space to download all of this.
Another tip is that I also build kernels using gcc3.3 and -march -O flags
on my p4 laptop, and all goes well. It seems that only fails on the p200
box.
>How-To-Repeat:
Just rebuild:
cd /usr/src/sys/arch/i386/compile/PANCAKE_PANSER/
export CFLAGS="-O3 -march=i586 -funroll-loops"
make clean ; make depend ; make
>Fix:
Makefiles could take alert on that, or gcc doesn't have to optimize
__asm__ code in kernel :? I don't know.
>Release-Note:
>Audit-Trail:
>Unformatted: