diff options
Diffstat (limited to 'src/runtime/mbitmap.go')
-rw-r--r-- | src/runtime/mbitmap.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go index 5301e692e0..87fa027b4e 100644 --- a/src/runtime/mbitmap.go +++ b/src/runtime/mbitmap.go @@ -1994,7 +1994,9 @@ func reflect_gcbits(x interface{}) []byte { return ret } -// Returns GC type info for object p for testing. +// Returns GC type info for the pointer stored in ep for testing. +// If ep points to the stack, only static live information will be returned +// (i.e. not for objects which are only dynamically live stack objects). func getgcmask(ep interface{}) (mask []byte) { e := *efaceOf(&ep) p := e.data @@ -2051,11 +2053,6 @@ func getgcmask(ep interface{}) (mask []byte) { _g_ := getg() gentraceback(_g_.m.curg.sched.pc, _g_.m.curg.sched.sp, 0, _g_.m.curg, 0, nil, 1000, getgcmaskcb, noescape(unsafe.Pointer(&frame)), 0) if frame.fn.valid() { - // TODO: once stack objects are enabled (and their pointers - // are no longer described by the stack pointermap directly), - // tests using this will probably need fixing. We might need - // to loop through the stackobjects and if we're inside one, - // use the pointermap from that object. locals, _, _ := getStackMap(&frame, nil, false) if locals.n == 0 { return |