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
Valgrind errors in multiple unit tests #4439
Comments
Hi, which compiler did you use to compile shogun? I just did the same check (both in debug and release mode) and did not get any errors. (I also used valgrind 3.13.0) |
I basically setup a CLion project on my Ubuntu 18.04 machine and tested it on the executable generated there. In that case the above errors show. |
What are the compile flags passed by your CLion via cmake? I think it might be worth investigating it now, considering it is a recent change that causes that error and we can narrow it down. |
Many thanks for reporting. Can you track down the exact change that started causing this? |
I thought might be a one off thing, but after deleting and rebuilding valgrind still reports the errors. That said, here is what the cmake configuration step looks like with the CLion build: |
again, if we want to find out what is going on here, it might be best to find out what commit (or even better line changed) started causing those issues ... whether they are real issues, and what the best solution would be |
Sure, I can try to find out where its failing - Regarding whether its a real issue I'm not sure how to figure out. It does seem awkward that the error only occurs when building with CLion.
|
Another update, so I've figured out when Valgrind reports the error - its when I build with I'll try checking a few commits in between and let you'll know. But could someone else confirm theyre seeing these errors and its not just me. |
It seems the commit on Nov 15th,
|
very interesting! This is a great investigation, appreciated. @gf712 is away for a week and a bit so it might take a while to fix it. But I will have a look at the commit and check/think a bit |
Just had a better look, and it seems like the default constructor of AnyParameterProperties does not set the old class member values which then causes issues when the copy constructor is called. I’ll fix it! I’m not sure what the large range is about though. |
OK, should be fixed. |
@gf712 thanks for the suggestion, I'll try it out! |
Also, isnt it a bit surprising that the problem only reveals itself when running valgrind with sanitizers. I read up more and apparently running valgrind with sanitizers leads to problems at times. That said, it still looks like this wasnt a false positive. Im curious about others thoughts on this? What should be the correct way to run valgrind/sanitizers independently to catch this bug? |
On the current latest
develop
branch, when runningvalgrind --leak-check=full ./shogun-unit-test --gtest_filter=*NeuralInputLayer*
(or other filters) Im getting thousands of errors all of which seem to be complainingConditional jump or move depends on uninitialised value(s)
.When running the same on a version from one month back(commit hash
f6efd89467a7016be8a50bf3f7c0fdf32b075369
) theres no errors.Here is the valgrind output log:
valgrind_out.txt
The text was updated successfully, but these errors were encountered: