Bug 37414 - Environment.Is64BitOperatingSystem returns false on OS X
Summary: Environment.Is64BitOperatingSystem returns false on OS X
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
: 5483 ()
Depends on:
Reported: 2016-01-05 14:25 UTC by Marek Habersack
Modified: 2016-01-13 02:01 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 GitHub or Developer Community 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.

Related Links:

Description Marek Habersack 2016-01-05 14:25:14 UTC
The property currently checks the pointer size which, under 32-bit Mono, will be 4 and thus the property will return 'false' which is incorrect since the operating system is 64-bit.
Comment 1 Marek Habersack 2016-01-05 14:29:10 UTC
The code to query the bitness of the OS could just invoke sysctl, in its simplest and most primitive form:

$ sysctl hw.optional.x86_64
hw.optional.x86_64: 1
Comment 2 Alexander Köplinger [MSFT] 2016-01-12 16:10:30 UTC
I took a stab at it in https://github.com/mono/mono/pull/2422
Comment 3 Alexander Köplinger [MSFT] 2016-01-12 16:11:13 UTC
*** Bug 5483 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Köplinger [MSFT] 2016-01-13 02:01:34 UTC
PR was merged.