Stabilize Coverity Scan triage and document known false positives - #374
Merged
Conversation
antonwolfy
force-pushed
the
backport/coverity-triage-docs
branch
from
September 3, 2026 10:23
b099107 to
706a225
Compare
antonwolfy
force-pushed
the
backport/coverity-triage-docs
branch
from
September 3, 2026 10:28
706a225 to
a69587a
Compare
Backport of IntelPython/mkl_umath#266, adapted to mkl_fft. - Pin cython==3.3.0 in the Coverity workflow (only there, not in pyproject.toml) so the generated _pydfti.c stays byte-stable between scans and Coverity CIDs plus their triage survive. Works because the scan build uses --no-build-isolation. - Add coverity/README.md: where findings come from across mkl_fft's two translation units (template-generated mklfft.c, which is our DFTI logic and stays in scope, and Cython-generated _pydfti.c), the Cython-pin rationale, an opt-in Project Component, a review checklist, and the verified false-positive families for the mkl_fft project. The known false positives are grouped by checker + mechanism (matched on checker + mechanism, not CID, since CIDs reset on a Cython bump): Cython-generated boilerplate (tp_traverse DEADCODE, version/ABI-guarded helper DEADCODE, a reference-cleanup UNUSED_VALUE, a CHECKED_RETURN) and two dead-by-construction families in our own .pyx (redundant is-NULL guards Cython already proves, and an intentional in-place placeholder stub) - all triaged Intentional / Ignore. mkl_umath's own documented false positives were not ported blind; the table was rebuilt from mkl_fft's own scan and generated code.
antonwolfy
force-pushed
the
backport/coverity-triage-docs
branch
from
September 3, 2026 10:33
a69587a to
a16f45c
Compare
antonwolfy
marked this pull request as ready for review
September 3, 2026 10:35
antonwolfy
requested review from
jharlow-intel,
ndgrigorian,
vlad-perevezentsev and
xaleryb
as code owners
September 3, 2026 10:35
ndgrigorian
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Backport of IntelPython/mkl_umath#266, adapted to mkl_fft. Stabilizes Coverity Scan triage and documents the verified false positives.
Two changes:
1. Pin Cython in the Coverity workflow
cython==3.3.0in.github/workflows/coverity.ymlonly (notpyproject.toml, so shipped wheels are unaffected). A Cython version bump regenerates_pydfti.cwholesale, which churns Coverity CIDs and silently drops their triage; pinning keeps the generated code byte-stable between scans. Works because the scan build runs with--no-build-isolation.2. Add
coverity/README.mdA triage guide covering:
mklfft.c(our oneMKL DFTI logic, kept in scope) and Cython-generated_pydfti.c.mklfft.c, themkl_fft/src/*.hhelpers, and the__pyx_pf_*bodies in scope.Documented false-positive families
All triaged Intentional / Ignore / Minor.
Cython-generated boilerplate (
_pydfti.c):DEADCODE—tp_traversebase-traversal preamble (__Pyx_Coroutine_traverse,__Pyx_CyFunction_traverse,_genexprand_get_element_stridesscope traversals) — one mechanism.DEADCODE— version/ABI-guarded helpers (__Pyx_VectorcallBuilder_AddArg,__Pyx_PyCode_New,__Pyx_ParseKeywordDict).UNUSED_VALUE— Cython reference-cleanup epilogue in_c2r_fft1d_impl.CHECKED_RETURN—__Pyx_Generator_Replace_StopIteration.Our
.pyx, dead-by-construction (__pyx_pf_*):DEADCODE— redundantis NULLguards in_process_arguments/_direct_fftndthat Cython's own post-call error check already makes unreachable.DEADCODE— the_c2r_fft1d_implin-place stub (in_place = 0right beforeif in_place:), an intentional placeholder.Adaptation from mkl_umath
mkl_fft's translation units differ from mkl_umath's, so the table was rebuilt from mkl_fft's own scan and generated code, not copied. mkl_umath's documented families (the
__umath_generated.cInitOperatorsDEADCODE, thewith-statement DEADCODE, the__Pyx__ImportDEADCODE — which is inverted here because mkl_fft's module namemkl_fft._pydfticontains a dot — and the_patch_implFORWARD_NULL) do not occur in mkl_fft and were deliberately omitted.