Revert "cmd/compile: don't call memclrNoHeapPointersPreemptible from nosplit functions"

This reverts CL 756123.

Reason: Adding preemptible memclrNoHeapPointers exposes existing unsafe
use of notInHeapSlice, causing crashes. Revert the memclr stack until
the underlying issue is fixed.

For #78254.

Change-Id: Ic5e6eee8e87f219e06bec8610fcc85cd52d634b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/757341
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Michael Pratt
2026-03-20 17:45:30 -04:00
committed by Gopher Robot
parent f2dae4c19d
commit 0a750df0b2
2 changed files with 0 additions and 4 deletions

View File

@@ -723,8 +723,6 @@ func extendSlice(n *ir.CallExpr, init *ir.Nodes) ir.Node {
if hasPointers {
clrname = "memclrHasPointers"
ir.CurFunc.SetWBPos(n.Pos())
} else if ir.CurFunc.Pragma&ir.Nosplit != 0 {
clrname = "memclrNoHeapPointers"
}
var clr ir.Nodes

View File

@@ -588,8 +588,6 @@ func arrayClear(wbPos src.XPos, a ir.Node, nrange *ir.RangeStmt) ir.Node {
// memclrHasPointers(hp, hn)
ir.CurFunc.SetWBPos(wbPos)
fn = mkcallstmt("memclrHasPointers", hp, hn)
} else if ir.CurFunc.Pragma&ir.Nosplit != 0 {
fn = mkcallstmt("memclrNoHeapPointers", hp, hn)
} else {
// memclrNoHeapPointersPreemptible(hp, hn)
fn = mkcallstmt("memclrNoHeapPointersPreemptible", hp, hn)