Subject: RE: Internal compiler error
To: Gunnar Helliesen <gunnar@bitcon.no>
From: Brian D Chase <bdc@world.std.com>
List: port-vax
Date: 01/06/1998 14:21:28
On Mon, 5 Jan 1998, Gunnar Helliesen wrote:

> hybelvax:/sys/arch/vax/compile/HYBELVAX# make
> cc  -O2 -Werror -I. -I../../../../arch -I../../../.. -nostdinc
> -DEXEC_AOUT -DEXE
> C_SCRIPT -DVAX410 -DDDB -DKTRACE -DINET -DFFS -DLFS -DMFS -DNFS -DFDESC
> -DKERNFS
>  -DNULLFS -DPROCFS -DUMAPFS -DUNION -DQUOTA -DFIFO -DNFSSERVER -DSYSVMSG
> -DSYSVS
> EM -DSYSVSHM -DCOMPAT_43 -DCOMPAT_09 -DCOMPAT_10 -DCOMPAT_11 -DCOMPAT_12
> -DTCP_C
> OMPAT_42 -DLKM -DMAXUSERS=8 -D_KERNEL  -D_VAX_INLINE_  -c param.c
> cc: Internal compiler error: program cc1 got fatal signal 4
> *** Error code 1
> 
> Stop.
> hybelvax:/sys/arch/vax/compile/HYBELVAX# 

Signal 4 is for illegal instruction.  So, we've basically got one of two
scenerios:  NetBSD/VAX is incorrectly reporting an illegal instruction
execution or `cc1' is actually executing an illegal instruction.  Since
the MicroVAXen don't implement the full VAX instruction set it's not
entirely unlikely that a rogue bit of code somehow got into the compiler.
Then again maybe the complier lost its mind and decided to run amuck in a
section of memory which didn't contain valid code?  I'll leave that as an
exercise for someone smarter than myself. 

My suggestion would be to apply voodoo and alter how the compiler runs. 
For instance, the file is being compiled with -O2 optimization.  With that
greater level of optimization the compiler is running other sections of
code within itself to perform those optimizations.  If you drop the
optimzation level to -O or -O0 then the compiler will say, "Oh goody.  I
don't need to run the foo optimizer on this code."  Thusly you will avoid
using certain areas of code in the `cc1' program.  If you're lucky you
might just avoid the section(s) which trigger the signal 4.

It ain't rocket science, but it's worth a try.

-brian.

(Been away from port-vax for a while as things have been rather
 hectic and I'm in between jobs presently).
---
Brian "JARAI" Chase | http://world.std.com/~bdc/ | VAXZilla LIVES!!!