HP compiler Bug
Greg Hogeweide
ghog@nortelnetworks.com
Wed Apr 4 08:45:00 GMT 2001
Dear Sir,
Madam
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ I am unable
to use the GNATS bug reporting system so hopefully you can help me. 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. If you could be help me it would be greatly appreciated. Thanks for
your help.
ÃÂ
Compiler : gcc
version 2.8.1
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 (highlighted line).
ÃÂ
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
ÃÂ
ÃÂ
ÃÂ
ÃÂ
ÃÂ
Cheers,
ÃÂ
Greg Hogeweide Design Environment
Support . Software Tools & Advanced Research Team
Nortel Networks, Wireless Development Centre Calgary,
Alberta Phone: 769-4790 ESN 758-4790
ÃÂ
ÃÂ
More information about the Gcc
mailing list