Peter N Lewis wrote:
At 6:56 AM +0200 12/8/03, Adriaan van Os wrote:
Error : Internal compiler error. GPCMacOSAll.pas line 160048
Perhaps the solution to this problem would be for each ICE to either print a stack backtrace, or if that isn't possible, for each ICE to display the source file and line number in GPC that generates this? At least then Frank would be able to figure out where to look?
No problem to provide the backtrace and the offending source line, but I doubt whether that will be helpful. If my understanding of "random" problems like the above (not Frank Engel's) is correct, the logic at the time of the crash isn't at fault, but some internal or external data structure has gone corrupt at an earlier time.
Peter was right, one of the reported crashes was indeed reproducible (details below). The question is whether this is a problem with enumerated types or with the option that debugs them.
Regards,
Adriaan van Os
[G4:~/gnu/testgpc/adriaan] adriaan% cat StyleItems.pas unit StyleItems; interface type StyleItemGPC = (bold,italic,underline,outline,shadow,condense,extend); end.
[G4:~/gnu/testgpc/adriaan] adriaan% gpc -c styleitems.pas --debug-gpi creating GPI file: styleitems.gpi GPI storing header: GNU Pascal unit/module interface GPI storing version: 20030507 D 3.3.1 GPI storing target: powerpc-apple-darwin GPI storing module name: Styleitems GPI storing source file name: styleitems.pas GPI storing module initializer: init_Styleitems GPI storing <77>: <identifier_node 0xccf630 Styleitems spelling StyleItems (styleitems.pas:1)>
.... huge output ...
GPI storing <103>: <const_decl 0xcd2ee0 Extend type <enumeral_type 0xcd2b60 Styleitemgpc unsigned SI size <integer_cst 0xc99918 constant unsigned 32> unit size <integer_cst 0xc99978 constant unsigned 4> align 32 symtab 0 alias set -1 precision 32 min <integer_cst 0xcd1e58 0> max <integer_cst 0xcd3018 6> values <tree_list 0xcd1d68 purpose <identifier_node 0xccf7b0 Bold spelling bold (styleitems.pas:3) value <const_decl 0xcd2c40 Bold>> value <integer_cst 0xcd1e58 constant unsigned tree_5 0> chain <tree_list 0xcd1d80 purpose <identifier_node 0xccf810 Italic spelling italic (styleitems.pas:3) value <const_decl 0xcd2cb0 Italic>> value <integer_cst 0xcd1ea0 constant unsigned tree_5 1> chain <tree_list 0xcd1d98 purpose <identifier_node 0xccf870 Underline spelling underline (styleitems.pas:3) value <const_decl 0xcd2d20 Underline>> value <integer_cst 0xcd1ee8 constant unsigned tree_5 2> chain <tree_list 0xcd1db0 purpose <identifier_node 0xccf8d0 Outline spelling outline (styleitems.pas:3) value <const_decl 0xcd2d90 Outline>> value <integer_cst 0xcd1f30 constant unsigned tree_5 3> chain <tree_list 0xcd1dc8 purpose <identifier_node 0xccf930 Shadow> value <integer_cst 0xcd1f78 4> chain <tree_list 0xcd1de0>>>>>> main_variant <enumeral_type 0xcd2b60 Styleitemgpc> chain <type_decl 0xcd2bd0>> VOID file styleitems.pas line 3 align 1 initial <integer_cst 0xcd3018 6> chain <const_decl 0xcd2e70 Condense>> styleitems.pas:4: internal compiler error: Bus error
The backtrace reads:
**********
Date/Time: 2003-08-12 13:11:10 +0200 OS Version: 10.2.4 (Build 6I32) Host: G4.local.
Command: gpc1 PID: 14659
Exception: EXC_BAD_ACCESS (0x0001) Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000024
Thread 0 Crashed: #0 0x0001ebf0 in store_tree (module.c:1638) #1 0x00021908 in create_gpi_files (module.c:2862) #2 0x0002a9e8 in main_yyparse (parse.c:313) #3 0x000980a0 in compile_file (toplev.c:2134) #4 0x0009d308 in do_compile (toplev.c:5384) #5 0x0009d3d4 in toplev_main (toplev.c:5414) #6 0x00002740 in _start (crt.c:267) #7 0x000025c0 in start
PPC Thread State: srr0: 0x0001ebf0 srr1: 0x0000f930 vrsave: 0x00000000 xer: 0x00000000 lr: 0x0001e798 ctr: 0x00000000 mq: 0x00000000 r0: 0x00000001 r1: 0xbfffd570 r2: 0x00000000 r3: 0x00000000 r4: 0x002eec88 r5: 0x00000022 r6: 0x00000010 r7: 0x002f09f0 r8: 0x00000000 r9: 0x00cd1cd8 r10: 0x00846a70 r11: 0x00cd3048 r12: 0x90073aa0 r13: 0x00000000 r14: 0x002ee50c r15: 0x0036d76c r16: 0x00000001 r17: 0x00000000 r18: 0x00000000 r19: 0x00000000 r20: 0x00cd3060 r21: 0xa0006bf8 r22: 0x00ccf630 r23: 0x00cd3048 r24: 0xbfffd5b0 r25: 0x00000000 r26: 0x00cd3060 r27: 0x00000000 r28: 0x00000068 r29: 0x00000000 r30: 0xbfffd9d0 r31: 0x0001e50c