Re: Some question about linker dlopen with valgrind
John Reiser <[email protected]>
| Newsgroups | gmane.comp.debugging.valgrind |
|---|---|
| Message-ID | <[email protected]> |
> On the Android OS, there is a question about the linker program with vaglrind memcheck; > > The 1^st experiment, the libc module *do*call the dlopen function to load some shared object, before the linker call the pre_init functions ( before transfer the cpu control to the main ), and then the valgrind *can not*trace malloc leak; > > The second experiment, the libc module *do not*call the dlopen function to load some shared object, before the linker call the pre_init functions ( before transfer the cpu control to the main ), and then the valgrind *can* trace malloc leak; > > I want to know why , and how to make valgrind can trace memory leak, while the libc module call the dlopen function to load some so, before the linker call the pre-init functions. > > If you want to add some args to trace, Please email me. > > Valgrind version 3.14. Thank you for stating the version of Valgrind. It is hard to follow and understand the descriptions of the first and second experiments. Please construct two test cases of specific literal source code with recipes for compile and linking, corresponding to the first and second experiments. Those two cases should be runnable under valgrind, and should illustrate the difference between them.