`opus_cpu_feature_check` doesn't check XState
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.3k
- Forks
- 808
- PR merge metrics
- No merged PRs in 30d
Description
opus_cpu_feature_check only checks cpuid today and not xgetbv which can cause crashes when AVX is disabled there.
The code should also check if it's enabled using GetEnabledXStateFeatures on Windows and _xgetbv otherwise.
Contributor guide
No contributing guide indexed for this repository
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 in celt/x86/x86cpu.c at lines 111-138 and trace how opus_cpu_feature_check currently handles cpuid. Compare the Windows GetEnabledXStateFeatures path with the non-Windows _xgetbv path, then build or run the relevant CPU feature checks to verify AVX is rejected when XState does not enable it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100