mac: Fix MacOSVersionNumber for 10.12.0 < version < 10.13.4

In 5412beb63386, I asserted (via my code) that the kern.osproductversion
sysctl was introduced in 10.12.0, but this was utterly wrong. It’s not
available until 10.13.4. Compare 10.13.3
xnu-4570.41.2/bsd/kern/kern_sysctl.c to 10.13.4
xnu-4570.51.1/bsd/kern/kern_sysctl.c, look for osproductversion.

https://pbs.twimg.com/media/EU0GDTVU4AY73KC.jpg

Failures appeared starting at
https://ci.chromium.org/p/chromium/builders/ci/Mac10.12%20Tests/37499
(https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8869605548532164608/+/steps/crashpad_tests_on_Intel_GPU_on_Mac_on_Mac-10.12.6/0/stdout).

This fixes expectations to not require kern.osproductversion to exist
until 10.13.4.

VM-tested on 10.12.6, 10.13.3, 10.13.4, and 10.14.0.

Bug: crashpad:347
Test: crashpad_util_test MacUtil.MacOSVersionNumber
Change-Id: I90124b22774f7fac3dce88c06500a71ad7a71cb2
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2402248
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
GitOrigin-RevId: 9a5a789123d7528d1c1cb71e66134fe0d7a9d37a
5 files changed
tree: d7bd815cd15ea9dc769a2c5bb645e2f318643850
  1. build/
  2. client/
  3. compat/
  4. doc/
  5. handler/
  6. infra/
  7. minidump/
  8. snapshot/
  9. test/
  10. third_party/
  11. tools/
  12. util/
  13. .clang-format
  14. .gitattributes
  15. .gitignore
  16. .gn
  17. .style.yapf
  18. .vpython
  19. AUTHORS
  20. BUILD.gn
  21. codereview.settings
  22. CONTRIBUTORS
  23. crashpad.gyp
  24. DEPS
  25. LICENSE
  26. navbar.md
  27. package.h
  28. README.md
README.md

Crashpad

Crashpad is a crash-reporting system.

Documentation

Source Code

Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.

Other Links