Skip to content

cmd/internal/obj: frame pointer missing for small functions #18103

Closed
@randall77

Description

@randall77
func f() {
    g()
}

Generates

000000000044cc60 <main.f>:
  44cc60:       64 48 8b 0c 25 f8 ff    mov    %fs:0xfffffffffffffff8,%rcx
  44cc67:       ff ff 
  44cc69:       48 3b 61 10             cmp    0x10(%rcx),%rsp
  44cc6d:       76 06                   jbe    44cc75 <main.f+0x15>
  44cc6f:       e8 0c 00 00 00          callq  44cc80 <main.g>
  44cc74:       c3                      retq   
  44cc75:       e8 f6 85 ff ff          callq  445270 <runtime.morestack_noctxt>
  44cc7a:       eb e4                   jmp    44cc60 <main.f>

There's no frame pointer manipulation here. There probably should be, backtraces done by the kernel profiler will miss (or even be messed up?) by this omission.

Hit this issue while working on #16638. We require frame pointers on every frame to make callers work using frame pointers.
@dvyukov
@rsc
@aclements

Activity

added this to the Go1.8 milestone on Nov 29, 2016
added
NeedsFixThe path to resolution is known, but the work has not been done.
on Nov 29, 2016
self-assigned this
on Dec 1, 2016
gopherbot

gopherbot commented on Dec 1, 2016

@gopherbot
Contributor

CL https://golang.org/cl/33754 mentions this issue.

locked and limited conversation to collaborators on Dec 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @quentinmit@randall77@gopherbot

        Issue actions

          cmd/internal/obj: frame pointer missing for small functions · Issue #18103 · golang/go