cch123 / cch123/supermonkey

panic: permission denied

Open
#19 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
257
Forks
15
PR merge metrics
No merged PRs in 30d

Description

![image](https://user-images.githubusercontent.com/99853473/164000169-692a98ae-11a9-4fce-85d4-3a15accb652f.png)
panic: permission denied [recovered]
panic: permission denied

goroutine 162 [running]:
testing.tRunner.func1.2({0x4b819e0, 0x55a90a8})
/usr/local/go/src/testing/testing.go:1209 +0x24e
testing.tRunner.func1()
/usr/local/go/src/testing/testing.go:1212 +0x218
panic({0x4b819e0, 0x55a90a8})
/usr/local/go/src/runtime/panic.go:1038 +0x215
github.com/cch123/supermonkey/internal/bouk.mprotectCrossPage(0x461f6e0, 0xc, 0x10)
/Users/sangtianyu/go/pkg/mod/github.com/cch123/supermonkey@v1.0.1/internal/bouk/replace_unix.go:15 +0xc5
github.com/cch123/supermonkey/internal/bouk.CopyToLocation(0x461f6e0, {0xc000651cc4, 0xc, 0xc000384108})
/Users/sangtianyu/go/pkg/mod/github.com/cch123/supermonkey@v1.0.1/internal/bouk/replace_unix.go:26 +0x5c
github.com/cch123/supermonkey/internal/bouk.ReplaceFunction(0x461f6e0, 0x4cf9f08)
/Users/sangtianyu/go/pkg/mod/github.com/cch123/supermonkey@v1.0.1/internal/bouk/replace.go:29 +0xb2
github.com/cch123/supermonkey/internal/bouk.patchValue({0x4b4e800, 0x4cf9f08, 0x0}, {0x4b4e800, 0x4cf9c18, 0x13}, 0x0)
/Users/sangtianyu/go/pkg/mod/github.com/cch123/supermonkey@v1.0.1/internal/bouk/monkey.go:96 +0x2b6
github.com/cch123/supermonkey/internal/bouk.Patch({0x4b4e800, 0x4cf9f08}, {0x4b4e800, 0x4cf9c18})
/Users/sangtianyu/go/pkg/mod/github.com/cch123/supermonkey@v1.0.1/internal/bouk/monkey.go:50 +0x17a
github.com/cch123/supermonkey.Patch({0x4b4e800, 0x4cf9f08}, {0x4b4e800, 0x4cf9c18})
/Users/sangtianyu/go/pkg/mod/github.com/cch123/supermonkey@v1.0.1/supermonkey.go:23 +0x2d

go env
GO111MODULE="on"
GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the panic using the shown macOS Go environment and inspect internal/bouk/replace_unix.go, especially mprotectCrossPage and its callers in CopyToLocation and ReplaceFunction. Compare the failing permission path with the stack trace and existing tests; done means the reported function patching scenario no longer panics with permission denied.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.