Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!BRL.MIL!sue From: sue@BRL.MIL (Susan Muuss, VLD/ASB) Newsgroups: comp.sys.sgi Subject: Compiler Bug Message-ID: <9105092153.aa04182@WOLF.BRL.MIL> Date: 10 May 91 01:53:52 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 115 Below is a sample program containing relevant lines of C code that caused ccom to dump core with a signal 138. Apparently, a missing semi-colon is the culprit. However, the compiler should ordinarily catch that and report a syntax error rather than die. A copy of the error message from the compiler's demise has also been appended as well a listing of which version of the software is installed on the machine where this problem manifested itself. The system is a 4D/280 with IRIX 3.3.1. Could this be fixed? Cheers, Sue Muuss ---------------------------------------------------- Script started on Thu May 9 21:20:41 1991 $ versions I = Installed, R = Removed Name Date Description I dev 90/09/14 4D1-3.3 Development System I dwb 89/11/20 DWB Opt PD, S4-DWB-3.2, 808-0012-010 I eoe1 90/09/14 4D1-3.3 Execution Only Environment (part 1) I eoe2 90/09/14 4D1-3.3 Execution Only Environment (part 2) I ftn 90/09/14 4D1-3.3 Fortran Option I maint1 (unknown product) I maint1 90/09/14 Maint1 Product 4D1-3.3.1 I nfs 90/09/14 4D1-3.3 Network File System I pfa 90/09/14 Power Fortran Accelerator R slip 90/02/09 IRIS Slip Product R vis 90/01/12 Personal Visualizer PD, 808-0160-001 $ $ lint bug2.c bug2.c ============== Warning: (26) v_len may be used before set /usr/bin/lint: 4037 Bus error - core dumped Error: lint pass 1 failed on bug2.c . Use cc to see compilation errors. Correct the errors before running lint. $ $ cc -c bug2.c Fatal error in: /usr/lib/ccom - core dumped Signal 138 $ $ ls -l core -rw-rw-r-- 1 sue graphics 504876 May 9 21:21 core $ dbx /usr/lib/ccom dbx version 2.0 8/6/90 14:02 Copyright 1987 Silicon Graphics Inc. Copyright 1987 MIPS Computer Systems Inc. Type 'help' for help. Reading symbolic information of `/usr/lib/ccom' . . . warning: Has no symbol table -- very little is supported without it Process name from core dump: ccom Process died at pc 0x41df7c of signal : bus error [using memory image in core] (dbx) where > 0 ( warning: Address 0 for 4 bytes is not in the core file 0x0, warning: Address 0x4 for 4 bytes is not in the core file 0x0, warning: Address 0x8 for 4 bytes is not in the core file 0x0, warning: Address 0xc for 4 bytes is not in the core file 0x0, warning: Address 0x10 for 4 bytes is not in the core file 0x0, warning: Address 0x14 for 4 bytes is not in the core file 0x0) [0x41df7c] warning: address 0xfffffffc for 4 bytes is not in the core file (dbx) interrupt (dbx) quit $ script done on Thu May 9 21:22:16 1991 ----------------------------------------- /* * Susanne L. Muuss, J.D. */ #define VADD2(a, b, c) (a)[X] = (b)[X] + (c)[X];\ (a)[Y] = (b)[Y] + (c)[Y];\ (a)[Z] = (b)[Z] + (c)[Z] #define VSET(a, b, c, d) (a)[X] = (b);\ (a)[Y] = (c);\ (a)[Z] = (d) typedef double vect_t[3]; typedef double point_t[3]; main() { int v_char_width; /* char. width in view space */ float v_len; /* scale length in view space */ float v_tick_hgt; /* total height of tick marks, view space */ float v_x_offset; /* distance the label is offset in x */ float v_y_offset; /* distance the label is offset in y */ point_t v_startpt; /* starting point of scales, view space */ point_t v_label_st; /* starting point of label, view space */ point_t v_offset; v_x_offset = 0.1 * v_len; v_y_offset = -(2 * v_tick_hgt + v_char_width) /* Error is a missing semi-colon, above, but compiler shouldn't die! */ VSET(v_offset, v_x_offset, v_y_offset, 0); }