Skip to content

Add a portable XERBLA handler API#5904

Open
moluopro wants to merge 23 commits into
OpenMathLib:developfrom
moluopro:fix/xerbla-handler
Open

Add a portable XERBLA handler API#5904
moluopro wants to merge 23 commits into
OpenMathLib:developfrom
moluopro:fix/xerbla-handler

Conversation

@moluopro

@moluopro moluopro commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

After #5899 corrected the CTest registration, the Windows ARM64 shared-library job exposed failures in the xerbla_* extension tests: calls originating in the OpenBLAS DLL did not reach the test executable's xerbla override.

#5901 works around this Windows DLL symbol-resolution limitation by switching the CI job to a static build. This PR instead adds an explicit XERBLA handler API for shared-library users and tests, and prevents BLAS and CBLAS error-exit failures from passing silently.

Changes

  • Adds openblas_set_xerbla, with handler replacement and NULL reset support.
  • Preserves the Fortran ABI and ELF strong-symbol interposition while normalizing routine-name lengths.
  • Preserves callback types in prefixed and suffixed installs without changing existing Windows export ordinals.
  • Uses explicit handlers where interposition is unavailable and propagates BLAS and CBLAS test failures through CTest and Make.

Comment thread docs/extensions.md Outdated
@martin-frbg

Copy link
Copy Markdown
Collaborator

While this looks like a very interesting addition, it still bothers me that it appears to be "only" the utest_ext job that fails to bind the matching xerbla, while the regular BLAS/CBLAS tests appear to manage just fine.

@moluopro

Copy link
Copy Markdown
Contributor Author

Good point. The regular BLAS/CBLAS tests had the same problem, but their failures were not propagated correctly.

I have prepared a fix and will push it shortly.

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.

3 participants