golang / mock

GoMock is a mocking framework for the Go programming language.
Apache License 2.0
9.3k stars 609 forks source link

permission denied on mac version 10.15 #336

Closed bj-wangjia closed 4 years ago

bj-wangjia commented 4 years ago

error permission denied occured when run gomock stack like this: panic(0x481a500, 0xc00023e208) /usr/local/Cellar/go/1.12.9/libexec/src/runtime/panic.go:522 +0x1b5 github.com/agiledragon/gomonkey.modifyBinary(0x445a840, 0xc0000ef064, 0xc, 0xc) /Users/wangjia/go/pkg/mod/github.com/agiledragon/gomonkey@v0.0.0-20190517145658-8fa491f7b918/modify_binary_darwin.go:11 +0x198 github.com/agiledragon/gomonkey.replace(0x445a840, 0xc00024a240, 0xc0000ef0f8, 0x5040a40, 0x47ce400) /Users/wangjia/go/pkg/mod/github.com/agiledragon/gomonkey@v0.0.0-20190517145658-8fa491f7b918/patch.go:164 +0xe6 github.com/agiledragon/gomonkey.(Patches).applyCore(0xc0000ef218, 0x47ce440, 0x4928378, 0x13, 0x47ce440, 0xc00024a240, 0x13, 0xc000242420) /Users/wangjia/go/pkg/mod/github.com/agiledragon/gomonkey@v0.0.0-20190517145658-8fa491f7b918/patch.go:140 +0xf9 github.com/agiledragon/gomonkey.(Patches).ApplyFunc(0xc0000ef218, 0x47ce440, 0x4928378, 0x47ce440, 0xc00024a240, 0x0) /Users/wangjia/go/pkg/mod/github.com/agiledragon/gomonkey@v0.0.0-20190517145658-8fa491f7b918/patch.go:60 +0x134 github.com/agiledragon/gomonkey.ApplyFunc(...) /Users/wangjia/go/pkg/mod/github.com/agiledragon/gomonkey@v0.0.0-20190517145658-8fa491f7b918/patch.go:22

codyoss commented 4 years ago

Hey @bj-wangjia did you figure this out? It seems to me less of a gomock issue and more of a local permissions issue on your machine.

codyoss commented 4 years ago

Closing as I don't believe this is a problem with gomock.

bj-wangjia commented 4 years ago

image I found the same problem on stackoverflow https://stackoverflow.com/questions/58481800/cause-permission-denied-while-execute-golang-syscall-mprotect But I don't know what should I do