From mboxrd@z Thu Jan 1 00:00:00 1970 From: ghog@nortelnetworks.com To: gcc-gnats@gcc.gnu.org Subject: debug/2496: get_eh_context error in gcc compiler Date: Thu, 05 Apr 2001 12:46:00 -0000 Message-id: <20010405193751.9868.qmail@sourceware.cygnus.com> X-SW-Source: 2001-04/msg00090.html List-Id: >Number: 2496 >Category: debug >Synopsis: get_eh_context error in gcc compiler >Confidential: no >Severity: critical >Priority: high >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Apr 05 12:46:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: ghog@nortelnetworks.com >Release: gcc 2.95 >Organization: >Environment: HP-UX 9000/712 >Description: I am getting a Segmentation fault on a function call consistently. It is in the assembly code on a function call. I can reproduce this bug consistently and I am unable to solve it. I have taken out one of my compiler flags -fno-exceptions and it will no longer link. I am getting the following linking error "/usr/ccs/bin/ld: Unsatisfied symbols: __get_eh_context (code)". I looked for where this is called and it is in the "doBehavior(eventObj);" function call. If you could be help me it would be greatly appreciated. Thanks for your help. Compiler : gcc version 2.95 Workstation: HP-UX 9000/712 Program Structure: void X::doBehavior(StateMachine *eventObj) { // runs the the objects event return; } void X::enterState(stateType state, StateMachine *eventObj) { pushState(state); doBehavior(eventObj); // Program Segmentation faults on this line, always. It does not get to the functions first line of code and it completes the line of code just prior to it. return; } Bug Conditions: The function call "doBehavior(eventObj)" is called approximately 10 - 15 times in a consistent loop. In the bellow assembler code the function calls that do work properly will run one after the other consecutively. Each Segmentation fault will die on the same line of assembly code (=>). Assembler Code: Dump of assembler code from 0x57a74 to 0x57b74: 0x57a74 : ldw 104(sr0,r6),r19 0x57a78 : ldo 38(r19),r5 =>0x57a7c : ldh 0(sr0,r5),r20 0x57a80 : extrs r20,31,16,r19 0x57a84 : addl r6,r19,r20 0x57a88 : ldw 4(sr0,r5),r19 0x57a8c : copy r20,r26 0x57a90 : ldw -2c(sr0,r3),r25 0x57a94 : copy r19,r22 0x57a98 : ble 3084(sr4,r0) 0x57a9c : copy r31,rp 0x57aa0 : b,n 0x57c4c >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: