-
Notifications
You must be signed in to change notification settings - Fork 14
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
Debug flags #169
Debug flags #169
Conversation
This reverts commit 3638513.
All good now! Agressive compiler checks don't give any warning, and we can now easily use the sanitizer to detect many issues at runtime. |
@scemama there is a bug at the compilation step:
|
Sorry... it compiles now :-) |
@scemama thanks! I ran a few tests through valgrind. The C tests look fine though there is one However, on the Fortran test I get the following error: I guess it's an artifact of the Fortran test modifications from PR #168
|
In this statement:
the string returned by I fixed it in the tests by initializing |
Fixed! You can merge now :-) |
Thank you @scemama ! It's interesting that I haven't seen this bug before, I used to run |
If that's OK with you, I prefer to fix the Python determinant tests first in PR #168 and then merge this PR. Nothing to do on your side, I will update this branch when it's done. |
Perfect! |
While I was improving the rust binding, the tests I made for determinants were not working with the text backend on the master branch. This was due to the too small representation of integers in the files, which is fixed in this PR. I think that this fix is an important one, but it breaks backward-compatibility of the text backend. When we merge, we may need to set the version to 3.0.0. |
Are you talking about the fix from the PR #168? If yes, then it does not require an update of the major version as the TREXIO API remains unchanged. It is an important bug fix of the determinant IO in the text backend, which can be reflected in the minor version bump, but i am not convinced that the API compatibility is violated. |
No, I am talking about the current PR. This particular commit: 0867434
You are right that the API is unchanged, maybe we should not change the major version. I think it is a bit urgent to fix this particular bug in the master branch. Maybe we can create another PR with only this commit to merge it quickly. What do you think? I think that the current PR is also important: when I tried to run the rust interface with the TREXIO of this particular branch, I had many errors detected at runtime that were silent before (some safe functions were not really safe...). It helped me fix some silent bugs in the rust interface! :-) |
The commit you mentioned was introduced in PR #168 and then appeared here after you forked the branch. If merging this bug fix it is urgent for you - I can merge PR #168 as it is but the python tests will remain broken until i find some time to fix them. Will it work for you? |
This is a good idea! Can you comment out the python tests that are broken so that we can get a green CI?
It is not only that they make the compiler happy, it is that they enable the possibility to use the adress sanitizer and some more agressive checking in the CI. So it will help keep the code clean in the long term.
In the foreign interfaces, I always use the safe functions. Also, it is possible that I use them in some QP plugins. I agree with you that they are not 100% safe, but they are as safe as the safe variants of the dangerous C functions (like strnlen, etc..). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scemama I am done with my review. I fixed the data corruption issue reported by @sheepforce, cleaned up some tests and addded the valgrind
checks to the CI.
We should fix the TREXIO exit codes decoding function before merging this PR.
Done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @scemama ! Ready to merge?
@q-posev Thanks for the review! |
This PR adds
--enable-debug
and--enable-sanitizer
to configure.ac to make many checks on the library for the github actions.It depends on PR #168
There are still some issues to fix before it can be merged, but I created the draft so that you know that I am working on it.