-
Notifications
You must be signed in to change notification settings - Fork 320
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
Segfault in 1.1.3 test suite #135
Comments
But I don't see the segfault on the #134 PR branch. |
ASAN says there's a heap use-after-free bug here. Looking into it. |
@jagerman I fixed one bug in the tests in #134 here: https://github.com/tevador/RandomX/pull/134/files#diff-dcda6435c83281150294cbf602037aeeR1001-R1002 Looks like it's exactly where you get your segfault. |
The bug is in tests.cpp. At line 1001 https://github.com/tevador/RandomX/blob/master/src/tests/tests.cpp#L1001 it destroys the vm, but doesn't set the vm pointer to NULL. Then it calls initCache(), which tries to use the vm pointer because it's non-NULL. https://github.com/tevador/RandomX/blob/master/src/tests/tests.cpp#L26 |
Upstream issue (and fix from) tevador#135 / tevador#134.
Fixed in 1.1.4 |
When I build 1.1.3 (on amd64, debian sid, on a Ryzen cpu) and run
./randomx-tests
I get a segfault (or sometimes Illegal instruction or some other failure) here which didn't happen in 1.1.2.I bisected it to the PR #133 merge commit. I've tried a few different gcc and clang versions and all fail at the same place. Edit: also tried on an intel box, same failure.
The text was updated successfully, but these errors were encountered: