-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
More resizing for truncating return values from LAPACK #1190
base: master
Are you sure you want to change the base?
Conversation
More to come. EDIT 2/12/25: Determined I wasn't using the right inputs to test the new path. Using a 100x110 array to test, which triggers the truncation path:
(more to come) |
Test failures may be real? |
@BioTurboNick Looks like a nice PR but seems to break some tests. |
Thanks! I'm mystified why it would work on Linux segfaults and isn't helpful in figuring out the cause, but Windows provides a The proximate cause is in But still, that should only produce garbage values in the extra part, not a segfault? And why only on x86_64? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1190 +/- ##
==========================================
- Coverage 91.89% 91.86% -0.03%
==========================================
Files 34 34
Lines 15360 15373 +13
==========================================
+ Hits 14115 14123 +8
- Misses 1245 1250 +5 ☔ View full report in Codecov by Sentry. |
Oy. Either the debug code caused it to go away, or the change in nightly from DEV.33 to DEV.38 did it. EDIT: Nope, not fixed by the newer nightlies. It's a Heisenbug. |
Finally, a minimal reproducer:
It seems that this is a bug in Julia (1.11 and nightly)? Seems to be producing undefined behavior. With various configurations of the end code I get a Julia crash with It seems some necessary ingredients are 1) initiating as a vector*; 2) passing the vector into the ccall; 3) reshaping the vector into a matrix (resize call not necessary, though can independently trigger a similar error). If the array is initiated as a matrix, and then later reshaped with And the issue goes away entirely if the offending line is wrapped in try/catch. *As far as C is concerned, an array is just a pointer to the start of a chunk of memory, so should make no difference on the C side of things? |
Found additional locations that could benefit from the changes in #1176 , but I haven't tested these as yet.