Home GnuPG
Diffusion GpgOL 05c70803c614

Start memdbg interface for COM ref counting

Description

Start memdbg interface for COM ref counting

* src/Makefile.am: Add memdbg files.
* src/common_indep.h (gpgol_release): Call memdbg_released.
* src/eventsink.h (install..sink): Use gpgol_queryInterface
* src/mailitem-events.cpp (Unload): Dump memdbg maps after unload.
* src/oomhelp.h (gpgol_queryInterface): New.
* src/mimedataprovider.cpp (MimeDataProvider::MimeDataProvider):
Register ref add.
* src/oomhelp.cpp (gpgol_queryInterface): New.
(get_object_name): Use non memdbg aware functions.
(get_oom_object): Use gpgol_queryInterface.
(get_oom_object): Print out refs when obtaining if.
(get_oom_control_bytag, get_object_by_id),
(get_oom_mapi_session): Use mdbg functions.

The idea is that in the end we will trace all
com reference obtains and releases to find mismatchs
and additionally all malloc / frees and C++ dtor / ctor
to find memory leaks and hopefully random instability or
crashes caused by invalid ref counting.

As we can't use valgrind or decent debugging in
Outlook on Windows tracking it ourself seems
to be useful.

Details

Provenance
aheineckeAuthored on Jul 20 2018, 8:20 AM
Parents
rO5e2078d4f668: Only shutdown for the last explorer close
Branches
Unknown
Tags
Unknown