Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
The following code produces a System.ArgumentOutOfRangeException:
"Current platform doesn't support this value.
Parameter name: value
Mono.Unix.Native.Syscall.getxattr(System.IO.Directory.GetCurrentDirectory(), "test", out value);
MacOS Version 10.9.3
But it works on Linux.
Version 18.104.22.168 PublicKeyToken=0738eb9f132ed756
The Errno enum values are based on the Linux values. On Linux, ENOATTR is an alias for ENODATA, and thus the Errno enum doesn't contain an entry for ENOATTR.
On OS X, ENOATTR is NOT an alias for ENODATA, and in this case getxattr() is setting errno to 93, which is ENOATTR. Since there's no mapping for ENOATTR, the exception is thrown.
Reviewing the OS X errno.h, I find that there are 20 error values which aren't yet bound in the Errno enum.
The fix is both simple and complicated: we need to add the missing constants to the Errno enum. The complication comes in adding the values without complicating the addition of future Linux error values; I see that Errno is also missing 7 new values from Linux as well.
Fixed in mono/d2b52794.