One more step towards unifying the symbolizer classes. This time, I'm implementing GetListOfModules on Windows, which then allows to use the current "POSIX" implementation of FindModuleNameAndOffsetForAddress and FindModuleForAddress on all platforms.
Details
- Reviewers
- None
Diff Detail
Event Timeline
Hi Kuba,
Have you seen the "Sanitizer coverage: PC vs modules are not handled efficiently?" email thread on llvm-commits I've started recently?
Basically, I'm up to refactor this very code and I think the current interface and implementation are suboptimal.
How blocked is your progress by this change? If you can wait a week or two, I can improve the code that uses these functions first and try to simplify the interface.
Since I have to do that anyways, I'm not sure it's efficient for us to do the same thing twice in parallel :)
lib/sanitizer_common/sanitizer_symbolizer.cc | ||
---|---|---|
164 | This line leaks a lot of memory every time a module lookup fails [e.g. a new shared object is dynamically loaded]. | |
lib/sanitizer_common/sanitizer_win.cc | ||
226 | This line looks dangerous to me now. It already owns a const char *full_name_;, and one day somebody might decide ~LoadedModule dtor should free up some memory, or hold some non-POD member. |
Hi Timur,
Have you seen the "Sanitizer coverage: PC vs modules are not handled efficiently?" email thread on llvm-commits I've started recently?
Basically, I'm up to refactor this very code and I think the current interface and implementation are suboptimal.
How blocked is your progress by this change? If you can wait a week or two, I can improve the code that uses these functions first and try to simplify the interface.
Please go ahead with your planned changes and don't worry about this patch now, we can revisit it later. Can you cc me on patches/commits?
Kuba
lib/sanitizer_common/sanitizer_symbolizer.cc | ||
---|---|---|
167 | Did it work for you on Linux? GetListOfModules depends on LibC, common symbolizer interface doesn't. |
This line leaks a lot of memory every time a module lookup fails [e.g. a new shared object is dynamically loaded].
I understand you've just moved this code around, but I think we should come up with a better solution if we've decided to refactor this code.