aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/utils/leak_detective.c
Commit message (Collapse)AuthorAgeFilesLines
* leak-detective: Whitelist libssl SSL_COMP_get_compression_methods()Martin Willi2014-09-241-0/+2
| | | | | This function is called by libcurl initialization with SSL, and uses a static allocation of compression algorithms not freed.
* windows: Add a common Windows header for platform specific wrappersMartin Willi2014-06-031-5/+3
| | | | | Include some more basic system headers in utils.h, so we can use that common header on the different platforms.
* leak-detective: LEAK_DETECTIVE_DISABLE completely disables LDTobias Brunner2014-04-031-6/+9
| | | | | If lib->leak_detective is non-null some code parts (e.g. the plugin loader) assume LD is actually used.
* utils: Move thread-safe strerror replacement to a separate fileTobias Brunner2014-02-241-1/+1
| | | | | For some utils _GNU_SOURCE might be needed but that conflicts with the signature of strerror_r(3).
* lib: All settings use configured namespaceTobias Brunner2014-02-121-3/+3
|
* leak_detective: Assign return value of realloc to bufThomas Egerer2014-02-101-1/+1
| | | | | | | If realloc return a pointer value different from the value to be reallocated, a double free can occur in this context. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com>
* leak-detective: Call {gm,local}time_r() to allocate static bufferMartin Willi2013-11-061-0/+5
| | | | | On OS X Mavericks, these functions use a static allocation and are hard to whitelist using other means.
* leak-detective: Register OS X specific hooks just onceMartin Willi2013-11-061-0/+7
| | | | | If we initialize libstrongswan more than once in the same process, we may not register the hooks twice.
* leak-detective: Reset leak list during cleanupMartin Willi2013-11-061-0/+1
| | | | This resets leak detective state should it get created/destroyed more than once.
* leak-detective: Use callback functions to report leaks and usage informationMartin Willi2013-11-061-36/+53
| | | | This is more flexible than printing reports to a FILE.
* Added tzset memory leak to whitelistAndreas Steffen2013-08-281-0/+1
|
* leak-detective: remove hdr entry when reallocating zero bytesMartin Willi2013-07-121-0/+6
|
* leak-detective: print total of allocated/leaked bytes in usage/reportMartin Willi2013-07-121-5/+13
|
* leak-detective: add a usage threshold option based on the number of allocationsMartin Willi2013-07-101-6/+11
|
* leak-detective: set_state() only affects the calling threadMartin Willi2013-07-101-13/+1
| | | | | The only user (bfd backtraces) is fine with that, and we really should not mess the enable flag while doing allocations with other threads.
* leak-detective: take a copy of backtrace while printing tracesMartin Willi2013-07-101-2/+3
| | | | | As we don't want to hold the lock, we must make sure backtraces keep valid while printing them.
* leak-detective: remove hdr from the allocation list during realloc()Martin Willi2013-07-101-39/+60
| | | | | | | If realloc moves an allocation, the original allocation gets freed. We therefore must remove the hdr from the list, as it is invalid. We can add it afterwards once it has been updated, allowing us to unlock the list during reallocation.
* leak-detective: (re-)whitelist some OpenSSL functionsMartin Willi2013-06-211-0/+5
| | | | | | | Some static allocations in plugins won't get freed, because in the test case process the plugins are not destroyed. If a plugin would clean up allocations done while just using the plugin, these show up as leak in the child process, letting tests fail.
* leak-detective: Resolve hooked functions during initializationTobias Brunner2013-06-111-1/+4
| | | | | | | | | If uses of dlopen(), e.g. when loading plugins, produce errors an error string could get allocated dynamically. At this point realloc() might not yet be resolved and when dlsym() is later called by leak detective to do so the error string might get freed while leak detective is disabled and real_free() will be called with a pointer into one of leak detective's memory blocks instead of a pointer to the block itself, causing a SIGSEGV.
* Add getter for the number of leaks to leak_detective_tTobias Brunner2013-06-111-2/+16
|
* openssl: Properly cleanup OpenSSL libraryTobias Brunner2013-05-081-7/+0
|
* leak-detective: add support for OS X by hooking default malloc zoneMartin Willi2013-05-061-5/+160
|
* leak-detective: remove unused malloc call countersMartin Willi2013-05-061-7/+0
|
* leak-detective: align allocations on both 32 and 64-bit systems to 32 bytesMartin Willi2013-05-061-0/+5
|
* leak-detective: call tzset() explicitly before enabling leak detectiveMartin Willi2013-05-061-6/+11
| | | | | tzset() is hard to whitelist on some systems, as there is no symbol involved. Call tzset() explicitly before initialization to avoid false positives.
* leak-detective: override malloc functions instead of using deprecated hooksMartin Willi2013-05-061-128/+206
| | | | | | | malloc hooks have become deprecated, and their use has always been problematic, especially in multi-threaded applications. Replace the functionality by overriding all malloc functions and query the system allocator functions using dlsym() with RTLD_NEXT.
* added getpwuid_r and initgroups to whitelistAndreas Steffen2013-03-031-0/+2
|
* Moved debug.[ch] to utils folderTobias Brunner2012-10-241-1/+1
|
* Moved data structures to new collections subfolderTobias Brunner2012-10-241-1/+1
|
* Add getspnam_r() to leak detective whitelistMartin Willi2012-08-101-0/+1
|
* Increase leak detective backtrace depth by a frameMartin Willi2012-07-131-4/+4
|
* Don't access tail magic when reallocating invalid memory, as it would crashMartin Willi2012-07-131-5/+7
|
* Add an external method to disable leak detective temporarlyMartin Willi2012-07-131-0/+30
|
* Add safe_strerror() to leak detective whitelistMartin Willi2012-07-111-0/+1
| | | | | | While the thread specific strerror buffer gets cleaned up for worker threads during their termination, the main thread itself, and so its strerror buffer, is still alive during leak reports.
* Added ctime function to white listSansar Choinyambuu2011-11-281-0/+1
|
* whitelist glibc instead of TrouSerS functionsAndreas Steffen2011-09-101-3/+4
|
* added leaky TrouSerS functions to whitelistAndreas Steffen2011-09-081-0/+3
|
* Use better packing of leak-detective memory_header to align pointersMartin Willi2011-05-251-5/+5
|
* Summarize leaks with identical backtraces, as we do it with memusageMartin Willi2011-05-251-88/+98
|
* Added a leak detective method to report current memory usage with backtracesMartin Willi2011-05-161-0/+94
|
* Make leak detective publicMartin Willi2011-05-161-1/+0
|
* Migrated leak_detective to INIT/METHOD macrosMartin Willi2011-05-161-12/+12
|
* Whitelisted another tzset variant and dlsymMartin Willi2011-02-181-0/+2
|
* Whitelist gnutls init functionMartin Willi2011-01-171-0/+2
|
* backtrace->contains_function takes multiple names, speeding up whitelist ↵Martin Willi2011-01-171-17/+2
| | | | check drastically
* Add some common glib non-leaks to whitelistMartin Willi2011-01-171-0/+10
|
* implemented IMC/IMV handlerAndreas Steffen2010-11-091-0/+2
|
* Handle PIN: as a magic keyword for prompt, use getpass() to silently read ↵Martin Willi2010-08-041-0/+1
| | | | credentials
* Added NSPR PR_CallOnce to leak detective whitelistMartin Willi2010-08-041-0/+2
|
* Added buffer checking variants of syslog functions to leak detectiveMartin Willi2010-08-041-0/+2
|