-
Notifications
You must be signed in to change notification settings - Fork 32
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
Memory problems with sparse jacobian #19
Comments
Hi, I just commited a fix to the master branch of ADOL-C. Could you try whether this helps to overcome your problem? Thanks, Andrea |
Hi, I've tried to run the same program as above with the last master version, but unfortunately it doesn't solve the issue, I still get the |
Hi, just noticed that you assume that might cause the problem. This is then located in the ColPack library, i.e., the external library used by ADOL-C. I will write to the developers about this issue. Best Andrea |
Hi, |
Hi, |
Issue migrated from gitlab.
Hello, I'm experimenting memory problems with the sparse jacobian.
To make them reproducible I've used the code from additional_examples/sparse/sparse_jacobian.cpp, kept the part containing the spare jacobian computation, and run it 10000 times to make bugs occur more frequently:
I can observe
double free or corruption (out)
and sometimesfree(): invalid next size (fast)
bugs occurring randomly (it needs on average 1000 calls tosparse_jac
before having a bug).Compiling the code with -fsanitize=address, I could get the following trace:
It seems however that this is not the only source of errors, but I couldn't catch all of them with sanitizers.
After some investigation, I found out that the bug only occurs when using column compression, and everything is fine with row compression (e.g. with
options[3] = 1
).So there might be an error with the lines from
sparsedrivers.cpp
:From what I've understood, it seems that the memory is being corrupted at some point (the memory is written at some place where it shouldn't be, but without causing segfault), and when this memory is freed we get the
double free or corruption
orinvalid next size
depending on which part of the allocated bloc is corrupted. However I couldn't find what caused this.Additional information
OS: Debian 10
Adol-C version: tested with v2.6.3 and with the current master branch (9d229164)
The text was updated successfully, but these errors were encountered: