Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix compilation errors when building SQLITE_DEBUG defined but without SQLITE_MEMDEBUG. (CVS 2964) |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
62dd2427784721436737a6e8e11fc05e |
User & Date: | danielk1977 2006-01-17 15:36:32.000 |
Context
2006-01-17
| ||
16:10 | Arrange for ThreadData to be automatically deallocated even if SQLITE_MEMDEBUG is defined. Fix for #1623. (CVS 2965) (check-in: 9e2e40845d user: danielk1977 tags: trunk) | |
15:36 | Fix compilation errors when building SQLITE_DEBUG defined but without SQLITE_MEMDEBUG. (CVS 2964) (check-in: 62dd242778 user: danielk1977 tags: trunk) | |
13:21 | Various fixes that allow the malloc() failure tests to pass again. (CVS 2963) (check-in: 0505405fb9 user: danielk1977 tags: trunk) | |
Changes
Changes to src/sqliteInt.h.
1 2 3 4 5 6 7 8 9 10 11 12 13 | /* ** 2001 September 15 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** Internal interface definitions for SQLite. ** | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | /* ** 2001 September 15 ** ** The author disclaims copyright to this source code. In place of ** a legal notice, here is a blessing: ** ** May you do good and not evil. ** May you find forgiveness for yourself and forgive others. ** May you share freely, never taking more than you give. ** ************************************************************************* ** Internal interface definitions for SQLite. ** ** @(#) $Id: sqliteInt.h,v 1.471 2006/01/17 15:36:32 danielk1977 Exp $ */ #ifndef _SQLITEINT_H_ #define _SQLITEINT_H_ /* ** Extra interface definitions for those who need them */ |
︙ | ︙ | |||
1753 1754 1755 1756 1757 1758 1759 | #ifndef SQLITE_OMIT_SHARED_CACHE void sqlite3TableLock(Parse *, int, int, u8, const char *); #else #define sqlite3TableLock(v,w,x,y,z) #endif void sqlite3MallocClearFailed(); | | | | | | | 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 | #ifndef SQLITE_OMIT_SHARED_CACHE void sqlite3TableLock(Parse *, int, int, u8, const char *); #else #define sqlite3TableLock(v,w,x,y,z) #endif void sqlite3MallocClearFailed(); #ifdef SQLITE_MEMDEBUG void sqlite3MallocDisallow(); void sqlite3MallocAllow(); #else #define sqlite3MallocDisallow() #define sqlite3MallocAllow() #endif #ifdef SQLITE_SSE #include "sseInt.h" #endif #endif |
Changes to src/util.c.
︙ | ︙ | |||
10 11 12 13 14 15 16 | ** ************************************************************************* ** Utility functions used throughout sqlite. ** ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** | | | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ** ************************************************************************* ** Utility functions used throughout sqlite. ** ** This file contains functions for allocating memory, comparing ** strings, and stuff like that. ** ** $Id: util.c,v 1.173 2006/01/17 15:36:32 danielk1977 Exp $ */ #include "sqliteInt.h" #include "os.h" #include <stdarg.h> #include <ctype.h> /* |
︙ | ︙ | |||
1343 1344 1345 1346 1347 1348 1349 | ThreadData *pTd = sqlite3OsThreadSpecificData(0); if( pTd && pTd->mallocFailed ){ pTd->mallocFailed = 0; sqlite3OsThreadSpecificData(0); } } | | | 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 | ThreadData *pTd = sqlite3OsThreadSpecificData(0); if( pTd && pTd->mallocFailed ){ pTd->mallocFailed = 0; sqlite3OsThreadSpecificData(0); } } #ifdef SQLITE_MEMDEBUG /* ** This function sets a flag in the thread-specific-data structure that will ** cause an assert to fail if sqliteMalloc() or sqliteRealloc() is called. */ void sqlite3MallocDisallow(){ assert( sqlite3ThreadData()->mallocDisallowed>=0 ); sqlite3ThreadData()->mallocDisallowed++; |
︙ | ︙ |
Changes to test/all.test.
1 2 3 4 5 6 7 8 9 10 11 12 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file runs all tests. # | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # 2001 September 15 # # The author disclaims copyright to this source code. In place of # a legal notice, here is a blessing: # # May you do good and not evil. # May you find forgiveness for yourself and forgive others. # May you share freely, never taking more than you give. # #*********************************************************************** # This file runs all tests. # # $Id: all.test,v 1.35 2006/01/17 15:36:33 danielk1977 Exp $ set testdir [file dirname $argv0] source $testdir/tester.tcl rename finish_test really_finish_test proc finish_test {} {memleak_check} if {[file exists ./sqlite_test_count]} { |
︙ | ︙ | |||
129 130 131 132 133 134 135 | # Both tests leak memory. Currently, misuse.test also leaks a handful of # file descriptors. This is not considered a problem, but can cause tests # in malloc.test to fail. So set the open-file count to zero before running # malloc.test to get around this. # catch {source $testdir/misuse.test} set sqlite_open_file_count 0 | | | 129 130 131 132 133 134 135 136 137 138 139 140 | # Both tests leak memory. Currently, misuse.test also leaks a handful of # file descriptors. This is not considered a problem, but can cause tests # in malloc.test to fail. So set the open-file count to zero before running # malloc.test to get around this. # catch {source $testdir/misuse.test} set sqlite_open_file_count 0 catch {source $testdir/malloc.test} catch {db close} set sqlite_open_file_count 0 really_finish_test |