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

Unified Diff: third_party/sqlite/patches/0002-Fix-expr.c-linker-error.patch

Issue 949043002: Add //third_party/sqlite to dirs_to_snapshot, remove net_sql.patch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
Index: third_party/sqlite/patches/0002-Fix-expr.c-linker-error.patch
diff --git a/third_party/sqlite/patches/0002-Fix-expr.c-linker-error.patch b/third_party/sqlite/patches/0002-Fix-expr.c-linker-error.patch
new file mode 100644
index 0000000000000000000000000000000000000000..2bba434ba1585833cc53f00fc218cf634e35119c
--- /dev/null
+++ b/third_party/sqlite/patches/0002-Fix-expr.c-linker-error.patch
@@ -0,0 +1,30 @@
+From f6f4cb7c2b4055a8683190ad1754b2027c3c522d Mon Sep 17 00:00:00 2001
+From: Mike Mammarella <mdm@chromium.org>
+Date: Thu, 24 Sep 2009 17:03:24 +0000
+Subject: [PATCH 02/16] Fix expr.c linker error.
+
+This can be seen when compiled with a sufficiently optimizing compiler.
+
+Original review URL: http://codereview.chromium.org/231010
+---
+ third_party/sqlite/src/src/expr.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/third_party/sqlite/src/src/expr.c b/third_party/sqlite/src/src/expr.c
+index 4012f6c..65f211e 100644
+--- a/third_party/sqlite/src/src/expr.c
++++ b/third_party/sqlite/src/src/expr.c
+@@ -856,7 +856,9 @@ static Expr *exprDup(sqlite3 *db, Expr *p, int flags, u8 **pzBuffer){
+ }else{
+ int nSize = exprStructSize(p);
+ memcpy(zAlloc, p, nSize);
+- memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize);
++ if( EXPR_FULLSIZE>nSize ){
++ memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize);
++ }
+ }
+
+ /* Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. */
+--
+2.2.1
+

Powered by Google App Engine
This is Rietveld 408576698