Skip to content

Add a portable XERBLA handler API#5904

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

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

Conversation

@moluopro

Copy link
Copy Markdown
Contributor

After #5899 fixed the CTest registration so that openblas_utest_ext ran the correct executable, the Windows ARM64 shared-library job exposed failures in the xerbla_* extension tests: some calls from the OpenBLAS DLL reached its normal XERBLA implementation instead of the test executable's override.

#5901 works around this Windows DLL symbol-resolution limitation by switching that CI job to a static build. This PR instead adds an explicit XERBLA handler API, giving shared-library users and tests a reliable mechanism that does not depend on link-time symbol interposition.

Changes

  • Adds openblas_set_xerbla for installing a process-wide handler, returning the previous handler, and restoring the default with NULL.
  • Preserves the Fortran XERBLA ABI and ELF strong-symbol interposition.
  • Normalizes routine-name lengths and bounds the default error output.
  • Prevents SYMBOLPREFIX and SYMBOLSUFFIX from mangling callback types in CMake and Make installs without changing existing Windows export ordinals.
  • Uses explicit handlers in tests and makes CBLAS error-exit mismatches return a failure status.

Comment thread docs/extensions.md Outdated
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