Subject: Re: panic while installing: page fault in supervisor mode
To: None <perry@piermont.com>
From: Andreas Wrede <andreas@planix.com>
List: port-i386
Date: 08/16/1997 20:40:28
On Fri, 15 Aug 1997 17:58:59 EDT "Perry E. Metzger" writes
> 
> You are suffering from a bug in the compilation of elink3.c --
> recompile the file without optimization, link it into a fresh kernel,
> and try again.

The compile of elink3.c without the -O2 flag gives a bunch of warnings, but 
the resulting kernel works:

cc  -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes -I. -I../../../../arch -I../../../.. -nostdinc -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DEXEC_AOUT -DEXEC_SCRIPT -DI386_CPU -DI486_CPU -DI586_CPU -DI686_CPU -DMATH_EMULATE -DRTC_OFFSET="0" -DMEMORY_DISK_HOOKS -DMEMORY_DISK_IS_ROOT -DMEMORY_DISK_SERVER="0" -DMINIROOTSIZE="0xc02" -DCOMPAT_10 -DCOMPAT_11 -DCOMPAT_12 -DLKM -DFFS -DMFS -DNFS -DCD9660 -DMSDOSFS -DFDESC -DKERNFS -DFIFO -DINET -DMAXUSERS=32 -D_KERNEL  -Di386  -c ../../../../dev/ic/elink3.c
cc1: warnings being treated as errors
machine/intr.h:106: warning: `spllower' defined but not used
machine/intr.h:151: warning: `softintr' defined but not used
machine/bus.h:527: warning: `bus_space_set_multi_1' defined but not used
machine/bus.h:545: warning: `bus_space_set_multi_2' defined but not used
machine/bus.h:563: warning: `bus_space_set_multi_4' defined but not used
machine/bus.h:601: warning: `bus_space_set_region_1' defined but not used
machine/bus.h:619: warning: `bus_space_set_region_2' defined but not used
machine/bus.h:637: warning: `bus_space_set_region_4' defined but not used
machine/bus.h:679: warning: `bus_space_copy_region_1' defined but not used
machine/bus.h:718: warning: `bus_space_copy_region_2' defined but not used
machine/bus.h:757: warning: `bus_space_copy_region_4' defined but not used

When interpreting the above warning it looks to me like turning on the optimizer 
masks the fact that some variables are not referenced. I have seen the 
inverse (ie. variables becoming unused when the code got optimized) but this 
looks suspicious to me.
-- 
Andreas Wrede              Planix, Inc.
andreas@planix.com         Networking, System Administration, Consulting
http://www.planix.com      Toronto, Ontario, Canada