Repository navigation
Conversation
Fix argument-error reporting in three interface routines: 1. interface/lapack/getrs.c and interface/lapack/zgetrs.c call xerbla when info != 0 without assigning *Info = -info, leaving *Info uninitialized for callers that override xerbla. Assign *Info = -info before returning, matching all other interface/lapack wrappers. 2. interface/lapack/zlauum.c passes sizeof(ERROR_NAME) to xerbla, including the trailing NUL byte. Pass sizeof(ERROR_NAME) - 1 to match lauum.c and the rest of interface/lapack. 3. interface/zimatcopy.c sets info = 9 on invalid ldb (the 8th parameter of cimatcopy and zimatcopy, carried over from 9-argument zomatcopy.c). Set info = 8 to match interface/imatcopy.c and update expected_info in test_cimatcopy.c and test_zimatcopy.c. Add utest regression coverage for invalid-argument *Info in sgetrs, dgetrs, cgetrs, and zgetrs.
This branch has not been deployed
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
This change fixes invalid-argument
inforeporting across[s/d/c/z]getrs,[c/z]lauum, and[c/z]imatcopy. First,interface/lapack/getrs.candinterface/lapack/zgetrs.cinvokexerblawheninfo != 0and return without setting*Info = -info, leaving*Infouninitialized when callers provide a non-abortingxerblahandler; all other 24 wrappers ininterface/lapack/assign*Info = -info. Second,interface/lapack/zlauum.cpassessizeof(ERROR_NAME)toxerbla, which includes the trailing NUL byte (7bytes vs6inlauum.c). Third,interface/zimatcopy.creportsinfo = 9on an invalidldbargument. Incimatcopyandzimatcopy,ldbis the 8th parameter, matchinginfo = 8ininterface/imatcopy.c; the value9originated from 9-parameterzomatcopy.c.Changes
*Info = -info;prior to returning oninfo != 0ininterface/lapack/getrs.candinterface/lapack/zgetrs.c.sizeof(ERROR_NAME) - 1toxerblaininterface/lapack/zlauum.c.info = 8on invalidldbininterface/zimatcopy.cand updateexpected_infofrom9to8inutest/test_extensions/test_cimatcopy.candutest/test_extensions/test_zimatcopy.c.utestregression tests verifying*Infoon invalid arguments forsgetrs,dgetrs,cgetrs, andzgetrs.Verification
openblas_utestandopenblas_utest_exton Windowsx86_64(HASWELL, MinGW-w64 GCC 14.3.0), verifying[s/d/c/z]getrsnegative*Infoassignments and allcimatcopyandzimatcopybad-argument tests.