Bug 4060 - Stack frame epilogues broken
Summary: Stack frame epilogues broken
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
Depends on:
Blocks: 1839 3076 3346 4059 5959
  Show dependency treegraph
Reported: 2007-02-15 23:45 UTC by Mike Cvet
Modified: 2008-03-18 16:06 UTC (History)
4 users (show)

See Also:
Last reconfirmed:

Test program for this bug. (1.19 KB, application/octet-stream)
2007-02-15 23:47 UTC, Mike Cvet
Entering jump() (11.90 KB, image/png)
2007-02-15 23:48 UTC, Mike Cvet
exiting jump() (12.11 KB, image/png)
2007-02-15 23:48 UTC, Mike Cvet

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Cvet 2007-02-15 23:45:43 UTC
Sometimes when stepping into new functions on i386, the frame being stepped /
from/ may dissapear when performing instruction steps.

TestStackBacktrace.testFramePushing and TestStackBacktrace.testFramePopping are 
designed to test this.

These tests do not fail on x86_64 but do appear to fail on x86.

I'll attach a testcase, but the general sitation is that the order of frames 
should be:

main -> foo -> jump

but during the push of 'jump' onto the call stack, the trace may show:

main -> jump

and similarly doing the pop of 'jump' off of the call stack.
Comment 1 Mike Cvet 2007-02-15 23:47:53 UTC
Created attachment 1555 [details]
Test program for this bug.

Perform instruction stepping when about to enter jump() and about to exit
jump() to reproduce the bug.
Comment 2 Mike Cvet 2007-02-15 23:48:27 UTC
Created attachment 1556 [details]
Entering jump()
Comment 3 Mike Cvet 2007-02-15 23:48:48 UTC
Created attachment 1557 [details]
exiting jump()
Comment 4 Mike Cvet 2007-02-16 16:01:04 UTC
For what its worth, also reproducable in GDB:

(gdb) bt
#0  jump () at stepper.c:55
#1  0x080483db in foo () at stepper.c:76
#2  0x080483f0 in main () at stepper.c:82
(gdb) stepi
0x08048355 in jump () at stepper.c:55
55      }
(gdb) bt
#0  0x08048355 in jump () at stepper.c:55
#1  0x080483f0 in main () at stepper.c:82
Comment 5 Mike Cvet 2007-02-16 16:10:08 UTC
Upstream bug:

Comment 6 Mike Cvet 2007-02-20 22:33:13 UTC
This bug only concerns the epilogues of the frames - the prologue part is moved 
to #4083