/ Check-in [a68b6580]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a target to main.mk that will fail if the amalgamation contains any exported symbols that do not begin with "sqlite3_". Run this target from within releasetest.tcl. Add "static" to a couple of private functions in mem3.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a68b6580c7d436c896a644a475cdba33c2c8d6e6
User & Date: dan 2011-07-07 08:19:16
Context
2011-07-07
08:52
Update the tool/symbols.sh script to check for accidentally exported global variables. check-in: 71b749a9 user: drh tags: trunk
08:19
Add a target to main.mk that will fail if the amalgamation contains any exported symbols that do not begin with "sqlite3_". Run this target from within releasetest.tcl. Add "static" to a couple of private functions in mem3.c. check-in: a68b6580 user: dan tags: trunk
07:37
Remove accidental global variable "doclist" from fts3Int.h. check-in: f244b2f3 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to main.mk.

   560    560   
   561    561   TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO)
   562    562   $(TEST_EXTENSION): $(TOP)/src/test_loadext.c
   563    563   	$(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION)
   564    564   
   565    565   extensiontest: testfixture$(EXE) $(TEST_EXTENSION)
   566    566   	./testfixture$(EXE) $(TOP)/test/loadext.test
          567  +
          568  +# This target will fail if the SQLite amalgamation contains any exported
          569  +# symbols that do not begin with "sqlite3_". It is run as part of the
          570  +# releasetest.tcl script.
          571  +#
          572  +checksymbols: sqlite3.o
          573  +	nm -g --defined-only sqlite3.o | grep -v " sqlite3_" ; test $$? -ne 0
   567    574   
   568    575   
   569    576   # Standard install and cleanup targets
   570    577   #
   571    578   install:	sqlite3 libsqlite3.a sqlite3.h
   572    579   	mv sqlite3 /usr/bin
   573    580   	mv libsqlite3.a /usr/lib

Changes to src/mem3.c.

   429    429   
   430    430   /*
   431    431   ** Free an outstanding memory allocation.
   432    432   **
   433    433   ** This function assumes that the necessary mutexes, if any, are
   434    434   ** already held by the caller. Hence "Unsafe".
   435    435   */
   436         -void memsys3FreeUnsafe(void *pOld){
          436  +static void memsys3FreeUnsafe(void *pOld){
   437    437     Mem3Block *p = (Mem3Block*)pOld;
   438    438     int i;
   439    439     u32 size, x;
   440    440     assert( sqlite3_mutex_held(mem3.mutex) );
   441    441     assert( p>mem3.aPool && p<&mem3.aPool[mem3.nPool] );
   442    442     i = p - mem3.aPool;
   443    443     assert( (mem3.aPool[i-1].u.hdr.size4x&1)==1 );
................................................................................
   504    504     memsys3Leave();
   505    505     return (void*)p; 
   506    506   }
   507    507   
   508    508   /*
   509    509   ** Free memory.
   510    510   */
   511         -void memsys3Free(void *pPrior){
          511  +static void memsys3Free(void *pPrior){
   512    512     assert( pPrior );
   513    513     memsys3Enter();
   514    514     memsys3FreeUnsafe(pPrior);
   515    515     memsys3Leave();
   516    516   }
   517    517   
   518    518   /*
   519    519   ** Change the size of an existing memory allocation
   520    520   */
   521         -void *memsys3Realloc(void *pPrior, int nBytes){
          521  +static void *memsys3Realloc(void *pPrior, int nBytes){
   522    522     int nOld;
   523    523     void *p;
   524    524     if( pPrior==0 ){
   525    525       return sqlite3_malloc(nBytes);
   526    526     }
   527    527     if( nBytes<=0 ){
   528    528       sqlite3_free(pPrior);

Changes to test/releasetest.tcl.

   151    151       -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1
   152    152       -DSQLITE_MAX_ATTACHED=62
   153    153     }
   154    154   }
   155    155   
   156    156   array set ::Platforms {
   157    157     Linux-x86_64 {
          158  +    "Debug-One"               "checksymbols test"
   158    159       "Secure-Delete"           test
   159    160       "Unlock-Notify"           "QUICKTEST_INCLUDE=notify2.test test"
   160    161       "Update-Delete-Limit"     test
   161         -    "Debug-One"               test
   162    162       "Extra-Robustness"        test
   163    163       "Device-Two"              test
   164    164       "Ftrapv"                  test
   165    165       "Default"                 "threadtest test"
   166    166       "Device-One"              fulltest
   167    167     }
   168    168     Linux-i686 {
................................................................................
   172    172       "Default"                 "threadtest fulltest"
   173    173     }
   174    174     Darwin-i386 {
   175    175       "Locking-Style"           test
   176    176       "OS-X"                    "threadtest fulltest"
   177    177     }
   178    178   }
          179  +
   179    180   
   180    181   # End of configuration section.
   181    182   #########################################################################
   182    183   #########################################################################
   183    184   
   184    185   foreach {key value} [array get ::Platforms] {
   185    186     foreach {v t} $value {