Skip to content

Commit eaf28a2

Browse files
fengyoulingopherbot
authored andcommitted
runtime: update outdated comments for deferprocStack
Change-Id: I0ea4d15da163cec6fe2a703376ce5a6032e15484 Reviewed-on: https://go-review.googlesource.com/c/go/+/714861 Reviewed-by: Keith Randall <khr@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org>
1 parent e12d8a9 commit eaf28a2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/runtime/panic.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,15 +545,13 @@ func deferprocStack(d *_defer) {
545545
d.rangefunc = false
546546
d.sp = sys.GetCallerSP()
547547
// The lines below implement:
548-
// d.panic = nil
549-
// d.fd = nil
550548
// d.link = gp._defer
551549
// d.head = nil
552550
// gp._defer = d
553-
// But without write barriers. The first three are writes to
551+
// But without write barriers. The first two are writes to
554552
// the stack so they don't need a write barrier, and furthermore
555553
// are to uninitialized memory, so they must not use a write barrier.
556-
// The fourth write does not require a write barrier because we
554+
// The third write does not require a write barrier because we
557555
// explicitly mark all the defer structures, so we don't need to
558556
// keep track of pointers to them with a write barrier.
559557
*(*uintptr)(unsafe.Pointer(&d.link)) = uintptr(unsafe.Pointer(gp._defer))

0 commit comments

Comments
 (0)