go – cause permission denied while execute golang syscall.MProtect-ThrowExceptions

Exception or error:

When I use package syscall like this:

 err := syscall.Mprotect(page, syscall.PROT_READ|syscall.PROT_WRITE|syscall.PROT_EXEC)

error occurs as below

permission denied

It seems EACCES error in C. What should I do?

How to solve:

Leave a Reply

Your email address will not be published. Required fields are marked *