Skip to content

fix: avoid unsafe host ISA selection in build arch detection#112

Open
kgeg401 wants to merge 1 commit intoalibaba:mainfrom
kgeg401:fix/issue-92-sigill-avx-compat
Open

fix: avoid unsafe host ISA selection in build arch detection#112
kgeg401 wants to merge 1 commit intoalibaba:mainfrom
kgeg401:fix/issue-92-sigill-avx-compat

Conversation

@kgeg401
Copy link

@kgeg401 kgeg401 commented Feb 14, 2026

Summary

  • make AUTO_DETECT_ARCH a real CMake option (default ON)
  • ensure explicit ENABLE_* architecture flags always override auto-detection
  • change x86 auto-detection to prefer host-safe -march=native for native builds
  • add cibuildwheel per-arch overrides to force conservative manylinux targets:
    • x86_64: -DAUTO_DETECT_ARCH=OFF -DENABLE_HASWELL=ON
    • aarch64: -DAUTO_DETECT_ARCH=OFF -DENABLE_ARMV8A=ON

Why

Current x86 auto-detection chooses the highest compiler-supported ISA, which can emit instructions unavailable on target machines and cause SIGILL.

Validation

  • static review of CMake arch-selection flow
  • validated pyproject.toml edits and cibuildwheel override structure
  • note: local environment lacks a usable C/C++ compiler toolchain, so compile/test verification is deferred to CI

Fixes #92

@CLAassistant
Copy link

CLAassistant commented Feb 14, 2026

CLA assistant check
All committers have signed the CLA.

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.

[Bug]: SIGILL: Illegal instruction (core dumped) on Intel Broadwell (i5-5200U)

2 participants