anrieff / libcpuid

a small C library for x86 CPU detection and feature extraction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cpuid_tool 0.6.2 does not work on osx

chenrui333 opened this issue Β· comments

πŸ‘‹ it looks like cpuid_tool 0.6.2 does not work on osx.

Reproduce

  • unzip the release artifact on a intel chip macOS machine
  • chmod +x ./bin/cpuid_tool
  • ./bin/cpuid_tool hanging forever

relates to Homebrew/homebrew-core#119322

I started a macOS Catalina VM, and I can see the infinite loop: it is similar to #172.

I ran some tests on macOS: the thread_policy_set() function is not failing in case the logical CPU number is invalid, thus the infinite loop.
3b0a1f7 is fixing the issue on macOS.