Skip to content

Fix Out-of-bouds panic in find_roots_eigen - #24

Merged
vorot merged 1 commit into
vorot:masterfrom
farmaazon:master
Oct 12, 2023
Merged

Fix Out-of-bouds panic in find_roots_eigen#24
vorot merged 1 commit into
vorot:masterfrom
farmaazon:master

Conversation

@farmaazon

Copy link
Copy Markdown
Contributor

When using find_roots_eigen in one of my projects I found a case when it panics with out-of-bound error.

Now, I'm not sure if the proposed fix is valid, but it seems to work in my project.

Additionally, I've removed the necessity of allocating new Vec in two places, but I haven't energy for trying to do it in the entire code.

@vorot

vorot commented Aug 24, 2023

Copy link
Copy Markdown
Owner

Merge conflict. Additionally, the previous commit 3d053a1 may already solve this issue.

@farmaazon

Copy link
Copy Markdown
Contributor Author

Indeed, the issue is solved. This PR just adds a test case, and I kept the replacement of some Vecs with slices/iterators. You may keep it if you want.

Also reduced allocations needed to use find_roots_eigen.
@farmaazon

Copy link
Copy Markdown
Contributor Author

Actually I was wrong in my previous comment: the issue is still there.

I didn't notice the parameters' order change. After updating my test the panic is still there.

So the last commits haven't solved the issue.

@vorot
vorot merged commit 45a5309 into vorot:master Oct 12, 2023
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.

2 participants