Skip to content

Commit 0c56f86

Browse files
committed
syscall: fix sycall.ptrace cause nosplit stack over 792 byte limit
Fixes #54291
1 parent 0c4db1e commit 0c56f86

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/syscall/ptrace_darwin.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,4 @@
66

77
package syscall
88

9-
// Nosplit because it is called from forkAndExecInChild.
10-
//
11-
//go:nosplit
12-
func ptrace(request int, pid int, addr uintptr, data uintptr) error {
13-
return ptrace1(request, pid, addr, data)
14-
}
9+
var ptrace = ptrace1

test/fixedbugs/issue54291.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// run -race -gcflags=all="-N -l"
2+
package main
3+
4+
import (
5+
"os/exec"
6+
)
7+
8+
func main() {
9+
cmd := exec.Command("echo", "test")
10+
_ = cmd.Start()
11+
}

0 commit comments

Comments
 (0)