Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: stack trace must handle adjusted-SP cases #5736

Closed
rsc opened this issue Jun 19, 2013 · 2 comments
Closed

runtime: stack trace must handle adjusted-SP cases #5736

rsc opened this issue Jun 19, 2013 · 2 comments

Comments

@rsc
Copy link
Contributor

rsc commented Jun 19, 2013

The stack frame walking code assumes that if pc == f->entry, then SP has not been
pushed down to allocate a frame yet, and otherwise it has. This is true for all the
cooperative preemption.

But a SIGPROF, which triggers a stack walk, can arrive at any time. The stack trace must
be able to handle a pc between f->entry and the stack adjustment. Similarly, the
stack trace must be able to handle the pc between the add of SP and the return.

The linker has this information and tells DWARF about it. Probably it has to tell the
runtime too. 

Perhaps as part of the runtime symtab cleanup, but perhaps important enough to do before.
@dvyukov
Copy link
Member

dvyukov commented Jun 19, 2013

Comment 1:

>Perhaps as part of the runtime symtab cleanup, but perhaps important enough to do
before.
It would also fix crashes on race builders.

@rsc
Copy link
Contributor Author

rsc commented Jul 30, 2013

Comment 2:

The new runtime information fixed this.

Status changed to Fixed.

@rsc rsc added fixed labels Jul 30, 2013
@rsc rsc self-assigned this Jul 30, 2013
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants