debug/2496: get_eh_context error in gcc compiler
Thu Apr 5 12:46:00 GMT 2001

>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
>Release:        gcc 2.95
HP-UX 9000/712
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 
void X::enterState(stateType state, StateMachine *eventObj)
    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.

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 <Mobile::enterState(unsigned long, StateMachineEvent *)+516>:  ldw 104(sr0,r6),r19

    0x57a78 <Mobile::enterState(unsigned long, StateMachineEvent *)+520>:  ldo 38(r19),r5

=>0x57a7c <Mobile::enterState(unsigned long, StateMachineEvent *)+524>:  ldh 0(sr0,r5),r20

   0x57a80 <Mobile::enterState(unsigned long, StateMachineEvent *)+528>:  extrs r20,31,16,r19

    0x57a84 <Mobile::enterState(unsigned long, StateMachineEvent *)+532>:  addl r6,r19,r20

    0x57a88 <Mobile::enterState(unsigned long, StateMachineEvent *)+536>:  ldw 4(sr0,r5),r19

    0x57a8c <Mobile::enterState(unsigned long, StateMachineEvent *)+540>:  copy r20,r26

    0x57a90 <Mobile::enterState(unsigned long, StateMachineEvent *)+544>:  ldw -2c(sr0,r3),r25

    0x57a94 <Mobile::enterState(unsigned long, StateMachineEvent *)+548>:  copy r19,r22

    0x57a98 <Mobile::enterState(unsigned long, StateMachineEvent *)+552>:  ble 3084(sr4,r0)

    0x57a9c <Mobile::enterState(unsigned long, StateMachineEvent *)+556>:  copy r31,rp

    0x57aa0 <Mobile::enterState(unsigned long, StateMachineEvent *)+560>:  b,n 0x57c4c



More information about the Gcc-bugs mailing list