• Keith Randall's avatar
    runtime: on stack copy, adjust BP · 1ea60c13
    Keith Randall authored
    When we copy the stack, we need to adjust all BPs.
    We correctly adjust the ones on the stack, but we also
    need to adjust the one that is in g.sched.bp.
    
    Like CL 33754, no test as only kernel-gathered profiles will notice.
    Tests will come (in 1.9) with the implementation of #16638.
    
    The invariant should hold that every frame pointer points to
    somewhere within its stack.  After this CL, it is mostly true, but
    something about cgo breaks it.  The runtime checks are disabled
    until I figure that out.
    
    Update #16638
    Fixes #18174
    
    Change-Id: I6023ee64adc80574ee3e76491d4f0fa5ede3dbdb
    Reviewed-on: https://go-review.googlesource.com/33895Reviewed-by: 's avatarAustin Clements <austin@google.com>
    1ea60c13
asm_amd64.s 48.6 KB