-
Notifications
You must be signed in to change notification settings - Fork 27
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
Possible out-of-bounds read from mo_match in spral_match_order #230
Comments
Thank you very much for the bug report! I strongly suspect this is caused by #205 which made some (what we thought were minor) changes to the |
I'm afraid this is my mistake, see #205 (comment) |
@mjacobse don't we also need to remove the following lines from Lines 458 to 484 in 19f5b3c
|
Thanks for looking into this. If you end up with a candidate PR with a fix, it's pretty quick for me to test it and report if I still see the problem. I can also still work on making a smaller reproducer, but it will take me a couple hours and I probably can't do it until tomorrow. |
Thanks @jwnimmer-tri, we'll let you know once we have a candidate PR with a fix for testing. |
But that is not about ordering and indices but instead just the scaling factors right? I'm not sure if the API of the scaling routines is supposed to promise anything about those scaling factors in case of singular matrices. Certainly worth to double check if the documentation says anything about this or if any use-cases assume a certain behaviour, but in any case would be mostly unrelated to this issue and #205 to my mind. |
Oh yes, you're right I was getting confused between the scaling and the ordering routines. I will create a PR with your proposed fix shortly. |
@jwnimmer-tri fixed in v2025.03.06 release. |
Perfect, thank you all! |
Thanks for your work on producing such useful software!
As part of the Drake test suite, we have code in Drake that calls Ipopt which calls SPRAL. And as part of our CI matrix, we run the tests under valgrind's
memcheck
tool which detects out-of-bounds reads (i.e., memory errors). After upgrading SPRAL to the latest tag 2025.03.03 (RobotLocomotion/drake#22693), we started seeing consistent reports of memory errors.I'll post some details below, but take note that this isn't necessarily a bug in SPRAL. It's possible that either Drake or Ipopt has a bug where we are passing bad arguments down into SPRAL, causing the problem. It's also possible that Valgrind is mistaken about there being a bug and there's no problem anyway.
The error report is in
match_order.f90
, and if I revert commit c2641c0, the error report no longer occurs.I thought I'd raise an issue now in case anything jumps out at the team here. I'm still going to work on trying to produce a more minimal test case to help zoom in on the problem, and understand if its real.
Here's the error report:
The text was updated successfully, but these errors were encountered: