-
Notifications
You must be signed in to change notification settings - Fork 263
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 leaks in ncdump - make all fails for address sanitizer build #504
Comments
Thanks for the comprehensive build info; I’ll take a look shortly :) |
Denis is this another case where the code does not attempt to free memory (like ncgen)? If so, I will just close this ticket. |
its a mix. The first one is a global constant used for error reporting, hence |
I think it would be very desirable for ncgen/ncdump to execute without any memory leaks at all. If that were the case, I could run all the ncdump/ncgen tests and check for more memory leaks in the library. The ncdump tests in particular test some complex behavior in the library, and running them with memory checking turned on would be useful, IMO. |
I can fix some of these. But I have a question about your memory checker. |
I am now using the built in "address sanitizer" of gcc. You can activate it with options -fsanitize=address -fno-omit-frame-pointer. It is more strict than valgrind, but offers excellent diagnostic capability. And it's built right into gcc, you you gotta love that. |
Interesting, and good to know; I wasn't aware they had added that to gcc. Once I get this backlog worked through, I'm going to update our test suites to offer that, either by default or optionally. |
Closing this as the linked issues appear to be addressed. |
Cloned the repo this morning on to my Ubuntu system (GNU toolchain) and built like this:
autoreconf -i && CPPFLAGS='-I/usr/local/zlib-1.2.11/include -I/usr/local/szip-2.1/include -I/usr/local/hdf5-1.10.1_memchecker/include' CFLAGS='-g -Wall -fsanitize=address -fno-omit-frame-pointer' LDFLAGS='-L/usr/local/zlib-1.2.11/lib -L/usr/local/szip-2.1/lib -L/usr/local/hdf5-1.10.1_memchecker/lib' ./configure && make all check
Note I have turned on the address sanitizer. Note also that HDF5 was built with --enable-using-memchecker.
make all fails in the ncdump directory:
So there are some memory leaks in ncdump.
I think this is actually also another bug because it appears that the generation of some test file is happening in make all, but that should only happen for make check.
Config.log and output of make are attached.
make_output.txt
config.log
The text was updated successfully, but these errors were encountered: