Closed devanwang closed 2 years ago
@devanwang 给mmap_unix.go里边的syscall.MAP_PRIVATE|syscall.MAP_ANON 修改成syscall.MAP_PRIVATE|syscall.MAP_ANON|syscall.MAP_JIT 试一下
手头没有相应的系统,无法确认
修改后不报syscall.Mmap: permission denied了 执行example下的http报了如下错误: unexpected fault address 0x10c184000 fatal error: fault [signal SIGBUS: bus error code=0x1 addr=0x10c184000 pc=0x104ba17e0]
那估计是link的问题,等找到运行环境了测试一下,我手头没有环境没发处理
@devanwang ,macosx在11.2以后增加了Jit的内存保护,需要进行迁移,你要是需要可以参考文档https://developer.apple.com/documentation/apple-silicon/porting-just-in-time-compilers-to-apple-silicon?language=objc
@devanwang already support macosx M1 with version https://github.com/pkujhd/goloader/commit/58633ce2516bba6ef0ca487c0a6182bb8832a746
M1芯片 macOS 12.2.1 ,报错mmap无权限 同样的参数配置,用C调用mmap正常
大佬看看是否是问题