Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Unified Diff: third_party/sqlite/src/src/mem1.c

Issue 2751253002: [sql] Import SQLite 3.17.0. (Closed)
Patch Set: also clang on Linux i386 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/sqlite/src/src/malloc.c ('k') | third_party/sqlite/src/src/mem5.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/sqlite/src/src/mem1.c
diff --git a/third_party/sqlite/src/src/mem1.c b/third_party/sqlite/src/src/mem1.c
index b960ccfd477368a2d0e7af46f74f7eb00a075fe2..efc84c41d7658a175aca40c8b612239690987524 100644
--- a/third_party/sqlite/src/src/mem1.c
+++ b/third_party/sqlite/src/src/mem1.c
@@ -125,7 +125,9 @@ static malloc_zone_t* _sqliteZone_;
*/
static void *sqlite3MemMalloc(int nByte){
#ifdef SQLITE_MALLOCSIZE
- void *p = SQLITE_MALLOC( nByte );
+ void *p;
+ testcase( ROUND8(nByte)==nByte );
+ p = SQLITE_MALLOC( nByte );
if( p==0 ){
testcase( sqlite3GlobalConfig.xLog!=0 );
sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
@@ -134,7 +136,7 @@ static void *sqlite3MemMalloc(int nByte){
#else
sqlite3_int64 *p;
assert( nByte>0 );
- nByte = ROUND8(nByte);
+ testcase( ROUND8(nByte)!=nByte );
p = SQLITE_MALLOC( nByte+8 );
if( p ){
p[0] = nByte;
« no previous file with comments | « third_party/sqlite/src/src/malloc.c ('k') | third_party/sqlite/src/src/mem5.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698