Opened 7 years ago

Closed 3 years ago

#11278 closed Bugs (obsolete)

--detect_memory_leaks useless without --catch_system_errors=n

Reported by: willi@… Owned by: Raffi Enficiaud
Milestone: Boost 1.63.0 Component: test
Version: Boost 1.58.0 Severity: Problem
Keywords: Cc:

Description

When using the unit test framework's runtime option --detect_memory_leaks=N (described in http://www.boost.org/doc/libs/1_58_0/libs/test/doc/html/utf/user-guide/runtime-config/reference.html) the resulting breakpoint is caught by the framework unless --catch_system_errors is set to n. This causes the debug break to not happen until halfway through the reporting of this fatal "breakpoint encountered" error, rendering the call stack useless.

This should at least be mentioned in the documentation; maybe detect_memory_leaks should imply catch_system_errors=n.

I'm on Windows 7x64 in a 32 bit debug build using MSVC14RC and the multithreaded static boost.test library.

Change History (3)

comment:1 by willi@…, 7 years ago

When I caught a casual glimpse of the source I noticed that system error catching might be disabled when running with a debugger attached, so I'd like to clarify that I'm running the executable separately and attach the debugger on demand once a breakpoint is hit. (Because I can't get Visual Studio to display the output after the program has terminated when debugging, so I can't see the leak report that way.)

comment:2 by Raffi Enficiaud, 6 years ago

Milestone: To Be DeterminedBoost 1.63.0
Owner: changed from Gennadiy Rozental to Raffi Enficiaud
Status: newassigned

comment:3 by Raffi Enficiaud, 3 years ago

Resolution: obsolete
Status: assignedclosed

In the current code (1.73) the debugger is detected at the start of each test. In that case, the parameter catch_system_errors is set to false.

Note: See TracTickets for help on using tickets.