JochenBaier / BugInsight

A memory leak and deadlock finder for C, C++
GNU General Public License v3.0
54 stars 2 forks source link
bug deadlock deadlock-avoidance deadlock-detection deadlock-free developer-tools leak leak-detection leaks memory memory-leak memory-leak-detection

A memory leak and deadlock finder for C, C++

Introduction

BugInsight is a tool for finding memory leaks and potential deadlocks in C/C++ software for Microsoft Windows OS.

Main reason for use is to test Windows applications that cannot be tested under Linux (e.g. with AddressSanitizer, ThreadSanitizer, Valgrind) and to test the Windows only parts of an application.

An other reason is the low overhead with I/O bound (e.g. TCP/IP) applications or Qt GUI applications. A real world test with a TCP/IP application shows a slowdown of 10 %, with option "--callstacks=false" only 5 %.

BugInsight can be used manually and automated in a CI system. BugInsight does not need to be linked and no rebuilding of the application is needed.

Install

  1. Download latest release Zip BugInsight-x.x.x.x.zip from releases
  2. Unzip to any location

Usage

BugInsight.exe [Options] [Configuration] -- ["]application_to_test.exe["] [application_to_test options]

Examples:

BugInsight.exe example_memory_leak.exe 
BugInsight.exe --on_error=fail -- example_deadlock.exe
BugInsight.exe --ignore_modules=libssl-3-x64.dll,libcrypto-3-x64.dll -- app.exe --app_option

Example output memory leak detection: Example_Output
Example output deadlock detection: Example_Output

Usage in VS debugger (the VS output window will display clickable call stacks):

  1. Install VS Extension Child Process Debugging Power Tool
  2. VS project properties:
    Debugging->Command: 'path to BugInsight.exe'
    Debugging->Command Arguments: '-- $(TargetPath)'

Application under test requirements

Features:

Monitored APIs

BugInsight can detect leaks or deadlocks from the following APIs: Monitored APIs. Please report missing APIs.
BugInsight monitors all modules (Exe ,DLL) used by application under test excluding modules provided by Windows OS (DLLs with Copyright info: 'Microsoft Corporation', e.g. Kernel32.dll).
BugInsight does not yet monitor handle leaks.

Command Line Options, Runtime API

Command Line Options
Runtime_API

Build BugInsight from source

Build_from_source

Alternatives (Windows OS)

Used Third-party software

Third-party software

License

BugInsight is licensed under the terms of the GNU General Public License v3.0 license. See LICENSE for more information.