Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uninitialized M when quick return in DLARRD and SLARRD #769

Merged
merged 1 commit into from Nov 29, 2022

Conversation

akobotov
Copy link

@akobotov akobotov commented Nov 29, 2022

Description
Quick return in DLARRD and SLARRD for N .LE. 0 happens too early, the output parameter M is left unset. This may lead to crash in ScaLAPACK's DLARRE2 and SLARRE2 respectfully, where the value returned in the M parameter is used to run a loop.

The fix:

  1. Moves the zero initialization of M before deciding to quick return.
  2. Removes duplicate initialization of INFO and duplicate check for quick return

Note

Most likely there are similar issues in other ?LARR? functions introduced on 16db9c2.

Copy link
Contributor

@langou langou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent contribution. Thanks. Yes, M should be set to 0 if N is 0. Great. Good fix. Thanks.

@langou langou merged commit 690e111 into Reference-LAPACK:master Nov 29, 2022
@langou
Copy link
Contributor

langou commented Nov 29, 2022

I opened #770 so that we remember

Most likely there are similar issues in other ?LARR? functions introduced on 16db9c2

Any help is welcome.

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.

None yet

2 participants