This also fixes the test/asan/TestCases/Darwin/malloc_zone-protected.cc test failure on OS X 10.10.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Also, for the sake of not breaking the ">=" version checks with every OS X release, I think we should have something like:
enum MacosVersion { MACOS_VERSION_UNINITIALIZED = 0, MACOS_VERSION_UNKNOWN, MACOS_VERSION_LEOPARD, MACOS_VERSION_SNOW_LEOPARD, MACOS_VERSION_LION, MACOS_VERSION_MOUNTAIN_LION, MACOS_VERSION_MAVERICKS, MACOS_VERSION_YOSEMITE, MACOS_VERSION_UNKNOWN_NEWER, }; ... switch (version[0]) { case '9': return MACOS_VERSION_LEOPARD; case '1': { switch (version[1]) { case '0': return MACOS_VERSION_SNOW_LEOPARD; case '1': return MACOS_VERSION_LION; case '2': return MACOS_VERSION_MOUNTAIN_LION; case '3': return MACOS_VERSION_MAVERICKS; case '4': return MACOS_VERSION_YOSEMITE; case '5'...'9': return MACOS_VERSION_UNKNOWN_NEWER; default: return MACOS_VERSION_UNKNOWN; } } default: return MACOS_VERSION_UNKNOWN; }