In this section:

Overview

This error is found during execution of the code in response to a false leak reported during runtime. During execution, Insure++ realizes that what it thought was a leak is not truly a leak. To prevent you from searching for a leak that is not really there, Insure++ notifies you that it does not exist, after all.

CodeDescriptionEnabledReportedPlatform
BOGUS_LEAKRuntime leak not found during execution(tick)RuntimeWindows/Unix


Problem

Such a situation can occur if a pointer arithmetic has taken place and Insure++ saw the memory allocated. Due to moving the pointer, Insure++ recognizes that there is not a pointer pointing to the block where it reports the leak. Later, during execution, Insure++ discovers the pointer is moved back and that there was not a leak after all. That is when the bogus leak message appears.

Error Report

The following report shows the original LEAK_SCOPE, where Insure++ thought there was a leak, followed by the BOGUS_LEAK, when it realized it made an error during execution.

The BOGUS_LEAK contains the stack trace of where it had originally thought there was a LEAK_SCOPE (for example, in main, at foo.c, 18), as well as the stack trace where Insure++ discovered it was mistaken (for example, in main, at foo.c, 19).

[foo.c:18] **LEAK_SCOPE**
>> 		}
	Memory leaked leaving scope: ff.ptr
	Lost block : 0x0804b068 thru 0x0804b07b (20 bytes)
			ff.ptr, allocated at foo.c, 16
				malloc() (interface)
				main() foo.c, 16
	Stack trace where the error occurred:
				main() foo.c, 18

[foo.c:19] **BOGUS_LEAK**
>> 		free(f[1].ptr);
	A bogus leak was reported: ff.ptr
	Found block : 0x0804b068 thru 0x0804b07b (20 bytes)
			ff.ptr, allocated at foo.c, 16
				malloc() (interface)
				main() foo.c, 16

	Stack trace where the leak was reported:
				main() foo.c, 18

	Stack trace where the error occurred:
				main() foo.c, 14.

Repair

There is nothing to repair. Rather, Insure++ is informing you that it made a mistake. Contact Technical Support to help us improve Insure++.

  • No labels