1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-30 19:03:16 +03:00

If memory is leaked when running a test script with the --malloctrace option, write out a file called leaks.sql in the same format as mallocs.sql containing th e leaked applications. The same tools can then be used to examine the stack traces associated with leaked allocations. (CVS 4926)

FossilOrigin-Name: f1b97ed93183378ff56b4fe7ae8ea269c24092fc
This commit is contained in:
danielk1977
2008-03-28 07:42:53 +00:00
parent 19db935225
commit dbdc4d49cb
5 changed files with 57 additions and 27 deletions

View File

@ -11,7 +11,7 @@
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
# $Id: tester.tcl,v 1.110 2008/03/22 01:08:01 drh Exp $
# $Id: tester.tcl,v 1.111 2008/03/28 07:42:54 danielk1977 Exp $
set tcl_precision 15
@ -260,6 +260,12 @@ proc finalize_testing {} {
memdebug_log_sql
sqlite3_memdebug_log stop
sqlite3_memdebug_log clear
if {[sqlite3_memory_used]>0} {
puts "Writing leaks.sql..."
sqlite3_memdebug_log sync
memdebug_log_sql leaks.sql
}
}
foreach f [glob -nocomplain test.db-*-journal] {
file delete -force $f