You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
In the first syscall, the calculation of the size of the args is done incorrectly, as it does not account for the 17 byte string executable_path= that prefixes name of the executable. This size is then used to allocate a buffer which is where the args are copied into.
In the second syscall, it writes zeros in the buffer instead of the executable name and its arguments due to a bug in the handling of a buffer that is too small.
More details about this issue is documented in the fixed version of xnu's kern_sysctl.c.
These bugs are not going to be fixed in Catalina because Apple has discontinued support for the OS. However, Catalina is still technically a supported platform for the latest version of Go, so I went ahead and created a patch in the x/sys package that works around the xnu kernel bug. I'm not sure how to submit it but I am looking for feedback on it.
The text was updated successfully, but these errors were encountered: