Skip to content

fix(mac): reject custom kernels with the wrong bundled Python ABI - #3558

Merged
jundot merged 1 commit into
jundot:mainfrom
PhilipJohnBasile:fix/app-python-abi
Sep 10, 2026
Merged

jundot merged 1 commit into
jundot:mainfrom
PhilipJohnBasile:fix/app-python-abi

Conversation

@PhilipJohnBasile

Copy link
Copy Markdown
Contributor

The app build can compile custom kernels with a different CPython ABI from the donor app's embedded interpreter, even when the build-time import succeeds. Compare the two interpreters before compilation, then validate the native _ext suffixes actually staged into the bundle. Existing MLX and nanobind checks remain in place.

This is the focused app ABI follow-up requested in #2640. Validation at ccea85b75758e5f1bd1d459c4726f847e3c0f04b: 8 regression tests passed, covering matching and mismatched ABIs, failed interpreter queries, staged suffix mismatches and missing extensions. Full app building and signing were not run.

Please review the donor-runtime selection and the fail-closed packaging behavior.

@PhilipJohnBasile

Copy link
Copy Markdown
Contributor Author

@jundot, could you review this focused app ABI follow-up to #2640? The eight regression tests pass. In particular, I would appreciate your review of donor interpreter selection and the validation after staging; full packaged-app building and signing remain untested.

@jundot

jundot commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Thanks for splitting this out. I verified the ABI checks against both the installed app’s Python and the local venvstacks export, and the mismatch tests pass. The guard runs before kernel cleanup and preserves the existing MLX and nanobind checks. LGTM, I’ll merge this.

@jundot
jundot merged commit b6f64a8 into jundot:main Sep 10, 2026
3 checks passed
kaushikvira pushed a commit to kaushikvira/omlx that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants