From: Youlin Feng Date: Sat, 25 Oct 2025 03:49:30 +0000 (+0800) Subject: runtime: update outdated comments for deferprocStack X-Git-Tag: go1.26rc1~401 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=eaf28a27fd814282af1a317c6fe83b180666880e;p=gostls13.git runtime: update outdated comments for deferprocStack Change-Id: I0ea4d15da163cec6fe2a703376ce5a6032e15484 Reviewed-on: https://go-review.googlesource.com/c/go/+/714861 Reviewed-by: Keith Randall LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Pratt Reviewed-by: Keith Randall Auto-Submit: Keith Randall --- diff --git a/src/runtime/panic.go b/src/runtime/panic.go index aee1cd0eed..ded85feffa 100644 --- a/src/runtime/panic.go +++ b/src/runtime/panic.go @@ -545,15 +545,13 @@ func deferprocStack(d *_defer) { d.rangefunc = false d.sp = sys.GetCallerSP() // The lines below implement: - // d.panic = nil - // d.fd = nil // d.link = gp._defer // d.head = nil // gp._defer = d - // But without write barriers. The first three are writes to + // But without write barriers. The first two are writes to // the stack so they don't need a write barrier, and furthermore // are to uninitialized memory, so they must not use a write barrier. - // The fourth write does not require a write barrier because we + // The third write does not require a write barrier because we // explicitly mark all the defer structures, so we don't need to // keep track of pointers to them with a write barrier. *(*uintptr)(unsafe.Pointer(&d.link)) = uintptr(unsafe.Pointer(gp._defer))