cpuinfo_get_current_core() return NULL on mac (intel chip)
Open
Nobody has claimed this yet.
bug
- Dominant language
- C
- Stars
- 1.2k
- Forks
- 409
- PR merge metrics
- No merged PRs in 30d
Description
- OS: macOSX 12.4
(base) ➜ cpuinfo git:(master) uname -a
Darwin ZZ-MBP.local 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:22 PDT 2022; root:xnu-8020.121.3~4/RELEASE_X86_64 x86_64
- cpuinfo commit:
* 5e63739 2022-07-18 | Add bazel support for iOS arm64 simulator (#105) (HEAD -> master, origin/master, origin/HEAD) [Keith Smiley] - Reproduce
#include <stdio.h>
#include "cpuinfo.h"
int main()
{
cpuinfo_initialize();
const cpuinfo_core* core = cpuinfo_get_current_core();
printf("core is %p\n", core);
cpuinfo_deinitialize();
return 0;
}
- Expected behaviour
The print value ofcoreshould be not "0x0" - The actual output
core is 0x0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the provided cpuinfo_get_current_core() reproducer on macOS 12.4 with an Intel chip, then trace the macOS x86_64 path used by that entry point. Done means cpuinfo_initialize() followed by cpuinfo_get_current_core() returns a non-NULL core pointer in this environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100