Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Apr 2020 03:53:50 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r532729 - head/databases/sqlite3/files
Message-ID:  <202004240353.03O3rojJ024427@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Fri Apr 24 03:53:50 2020
New Revision: 532729
URL: https://svnweb.freebsd.org/changeset/ports/532729

Log:
  Fix PowerPC segfault.
  
  The segfault fix was originally developed by our upstream, sqlite.org,
  to address S/390 and Sparc segfaults, both of which are big endian.
  Our PowerPC is also big endian, which this patch also fixes.
  
  Inspired by:	src r360223
  Approved by:	Approved by: portmgr (blanket: run-time bugfix)
  Obtained from:	https://www.sqlite.org/src/vinfo/04885763c4cd00cb?diff=1
  		https://sqlite.org/forum/forumpost/672291a5b2

Added:
  head/databases/sqlite3/files/
  head/databases/sqlite3/files/patch-sqlite3.c   (contents, props changed)

Added: head/databases/sqlite3/files/patch-sqlite3.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/sqlite3/files/patch-sqlite3.c	Fri Apr 24 03:53:50 2020	(r532729)
@@ -0,0 +1,18 @@
+--- sqlite3.c.orig	2020-01-27 12:25:19.000000000 -0800
++++ sqlite3.c	2020-04-23 19:24:26.380323000 -0700
+@@ -121302,12 +121302,14 @@
+             x = *sqlite3VdbeGetOp(v, addrConflictCk);
+             if( x.opcode!=OP_IdxRowid ){
+               int p2;      /* New P2 value for copied conflict check opcode */
++              const char *zP4;
+               if( sqlite3OpcodeProperty[x.opcode]&OPFLG_JUMP ){
+                 p2 = lblRecheckOk;
+               }else{
+                 p2 = x.p2;
+               }
+-              sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, x.p4.z, x.p4type);
++              zP4 = x.p4type==P4_INT32 ? SQLITE_INT_TO_PTR(x.p4.i) : x.p4.z;
++              sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, zP4, x.p4type);
+               sqlite3VdbeChangeP5(v, x.p5);
+               VdbeCoverageIf(v, p2!=x.p2);
+             }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004240353.03O3rojJ024427>