]> Cypherpunks repositories - gostls13.git/commit
runtime: fix the equality check in AddCleanup
authorCarlos Amedee <carlos@golang.org>
Tue, 21 Jan 2025 16:52:41 +0000 (11:52 -0500)
committerCarlos Amedee <carlos@golang.org>
Wed, 22 Jan 2025 17:26:33 +0000 (09:26 -0800)
commit9d21ef3bd43acedfe5317184e63cc6b3dd19cbdf
tree764db8ab4e073796fe0c2d964a8eb29f021cfad7
parent5a46b17b5f62616bdbc973bbd6a221edc02a0619
runtime: fix the equality check in AddCleanup

This fixes the check that ensures that arg is not equal to ptr in
AddCleanup. This also changes any use of throw to panic in AddCleanup.

Fixes #71316

Change-Id: Ie5a3e0163b254dff44b7fefedf75207ba587b771
Reviewed-on: https://go-review.googlesource.com/c/go/+/643655
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/mcleanup.go
src/runtime/mcleanup_test.go