goversion icon indicating copy to clipboard operation
goversion copied to clipboard

Getting address not mapped program compiled go 1.18 on M1 Mac

Open abezzub opened this issue 2 years ago • 1 comments

I am trying to use gops which uses goversion. I stepped through the code all the way to here: https://github.com/rsc/goversion/blob/master/version/read.go#L142

and I get back err "address not mapped". isGo is true here: https://github.com/rsc/goversion/blob/master/version/read.go#L52

abezzub avatar Apr 02 '22 01:04 abezzub

I have the same findings here. Interestingly enough, this doesn't happen to all programs compiled on the M1 Machine and also happens with 1.17. I have a couple of simple small applications that work fine, and a few others that return the "address not mapped" error.

If the same program is compiled with GOARCH=amd64 the version is returned correctly.

aymanrb avatar Apr 15 '22 08:04 aymanrb