agiledragon / gomonkey

gomonkey is a library to make monkey patching in unit tests easy
MIT License
2k stars 179 forks source link

arm64 下 permission denied 问题 #57

Open york1996 opened 3 years ago

york1996 commented 3 years ago

求解

agiledragon commented 3 years ago

Your arm64 machine is Mac OS? Please refer to https://github.com/agiledragon/gomonkey/issues/10

pzs-pzs commented 3 years ago

set env GOARCH=amd64

HobbyBear commented 3 years ago

Your arm64 machine is Mac OS? Please refer to #10

mac m1 用提到的方法不管用

zcool321 commented 3 years ago

mac m1 execute syscall.Mprotect error:

        panic: permission denied [recovered]
 err := syscall.Mprotect(page, syscall.PROT_READ|syscall.PROT_WRITE|syscall.PROT_EXEC)
    if err != nil {
        panic(err)
    }
Rudolphlin commented 3 years ago

Mac Darwin version MacOS Big Sur 11.5.2 syscall.Mprotect error: panic: permission denied.

jiajiali0511 commented 3 years ago

set env GOARCH=amd64

好用,解决问题。

zcool321 commented 3 years ago

set env GOARCH=amd64

好用,解决问题。

nice可以运行了,但是貌似就无法debug代码了~!~

kkHAIKE commented 3 years ago

max_prot=7 is not work after 11.4 https://gist.github.com/darfink/a756b88e999631d75cbbeefd3eee7e2d

freesinger commented 2 years ago

https://github.com/eisenxp/macos-golink-wrapper solves the problem perfectly.

m2keloop commented 2 years ago

set env GOARCH=amd64

use this, goland can't debug, do you know how to solve?

liuzhaoce commented 2 years ago

Your arm64 machine is Mac OS? Please refer to #10

麻烦看看最新的几个issue,arm64架构上的permission denied问题可以修复吗

agiledragon commented 2 years ago

Please try to this method, https://github.com/agiledragon/gomonkey/issues/70 @liuzhaoce @kkHAIKE @zcool321 @york1996

butcoder commented 2 years ago

arm64 MacOS can use amd64 version go, I change to go1.16.11 darwin/amd64,and https://github.com/eisenxp/macos-golink-wrapper

agiledragon commented 11 months ago

v2.11.0 has been released!