Skip to content

Fix truncating large workspace values#1195

Open
jberg5 wants to merge 1 commit intoReference-LAPACK:masterfrom
jberg5:fix-f32-issue
Open

Fix truncating large workspace values#1195
jberg5 wants to merge 1 commit intoReference-LAPACK:masterfrom
jberg5:fix-f32-issue

Conversation

@jberg5
Copy link

@jberg5 jberg5 commented Feb 27, 2026

Description
Addresses #1194.

Quick summary: using REAL() workspace values truncated unrepresentable values to the nearest representable value for a f32, meaning most integers over 2^24 would be wrong. Downstream users of these values would underallocate, leading to segfaults.

Have tested by building and running the MRE in the linked issue above.

I also asked Claude (with Opus 4.6) to create a test suite to prevent these kinds of regressions going forward. That said, I do not know fortran!! The REAL/DBLE issue was easy enough for me to understand, but TESTING/EIG/test_wq_rwork.f is not something I've personally been able to review with any level of confidence. I'm happy to remove it if it's valueless slop.

Checklist

  • The documentation has been updated.
  • If the PR solves a specific issue, it is set to be closed on merge.

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.

1 participant