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 out-of-bounds memory accesses exposed by xccblat3 testcase #1319

Merged
merged 2 commits into from
Oct 8, 2017
Merged

Fix out-of-bounds memory accesses exposed by xccblat3 testcase #1319

merged 2 commits into from
Oct 8, 2017

Conversation

martin-frbg
Copy link
Collaborator

Fixes #601. As far as I can tell, the data in these locations should be zero in any case.

@brada4
Copy link
Contributor

brada4 commented Oct 1, 2017

In longer run they become non-zero, looping benchmarks down could expose similar blunders much better.

@martin-frbg
Copy link
Collaborator Author

I do not believe my "solution" anymore either, currently trying to find if/where/when a01 grows beyond a.

@brada4
Copy link
Contributor

brada4 commented Oct 1, 2017

This at least assists with most visible case. I am pretty sure non-zero is not expected from behind the array.

@martin-frbg
Copy link
Collaborator Author

My current thinking is that the "if" block that contains the potential bug serves no useful purpose at all. Even when it happens to address something within the source array the matching result appears to be obtained by another iteration of the main loop anyway. At least I have not managed to come up with a testcase where the problematic code is both executed at all and required for a correct result.

...and does not appear to be needed even when it stays within the bounds of the array
@martin-frbg martin-frbg merged commit 97ecd49 into OpenMathLib:develop Oct 8, 2017
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