remove patch2 - double free when using createrepo

Related: #801981

Removing as the bug is no longer reproducible in rawhide even without
this patch. Also disabling malloc_usable_size() is not optimal[1]:

"If the HAVE_MALLOC_USABLE_SIZE option is omitted or is false, then
SQLite uses a wrapper around system malloc() and realloc() that enlarges
each allocation by 8 bytes and writes the size of the allocation in the
initial 8 bytes, and then SQLite also implements its own home-grown
version of malloc_usable_size() that consults that 8-byte prefix to find
the allocation size. This approach works but it is suboptimal.
Applications are encouraged to use HAVE_MALLOC_USABLE_SIZE whenever
possible. "

Reproducing steps:

\# export MALLOC_CHECK_=3
\# createrepo -d .
Directory walk started
Directory walk done - 15 packages
Temporary output repo path: ./.repodata/
Preparing sqlite DBs
Pool started (with 5 workers)
Pool finished

[1] https://www.sqlite.org/compile.html
This commit is contained in:
Zuzana Miklankova 2023-07-13 10:12:35 +02:00
parent 9c86df44e1
commit 1a12e88f50
No known key found for this signature in database
GPG Key ID: 46A18EF4D17103A0
2 changed files with 4 additions and 30 deletions

View File

@ -1,24 +0,0 @@
diff -up sqlite-src-3120200/configure.ac.malloc_usable_size sqlite-src-3120200/configure.ac
--- sqlite-src-3120200/configure.ac.malloc_usable_size 2016-04-25 09:46:48.134690570 +0200
+++ sqlite-src-3120200/configure.ac 2016-04-25 09:48:41.622637181 +0200
@@ -108,7 +108,7 @@ AC_CHECK_HEADERS([sys/types.h stdlib.h s
#########
# Figure out whether or not we have these functions
#
-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
+AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s strchrnul usleep utime pread pread64 pwrite pwrite64])
#########
# By default, we use the amalgamation (this may be changed below...)
diff -up sqlite-src-3120200/configure.malloc_usable_size sqlite-src-3120200/configure
--- sqlite-src-3120200/configure.malloc_usable_size 2016-04-25 09:47:12.594679063 +0200
+++ sqlite-src-3120200/configure 2016-04-25 09:49:28.684615042 +0200
@@ -10275,7 +10275,7 @@ done
#########
# Figure out whether or not we have these functions
#
-for ac_func in fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64
+for ac_func in fdatasync gmtime_r isnan localtime_r localtime_s strchrnul usleep utime pread pread64 pwrite pwrite64
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"

View File

@ -12,7 +12,7 @@
Summary: Library that implements an embeddable SQL database engine
Name: sqlite
Version: %{rpmver}
Release: 2%{?dist}
Release: 3%{?dist}
License: blessing
URL: http://www.sqlite.org/
@ -21,10 +21,6 @@ Source1: http://www.sqlite.org/%{year}/sqlite-doc-%{docver}.zip
Source2: http://www.sqlite.org/%{year}/sqlite-autoconf-%{realver}.tar.gz
# Support a system-wide lemon template
Patch1: sqlite-3.6.23-lemon-system-template.patch
# sqlite >= 3.7.10 is buggy if malloc_usable_size() is detected, disable it:
# https://bugzilla.redhat.com/show_bug.cgi?id=801981
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665363
Patch2: sqlite-3.12.2-no-malloc-usable-size.patch
# Temporary workaround for failed percentile test, see patch for details
Patch3: sqlite-3.8.0-percentile-test.patch
# Disable test date-2.2c on i686
@ -134,7 +130,6 @@ This package contains the analysis program for %{name}.
%prep
%setup -q -a1 -n %{name}-src-%{realver}
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%ifarch %{ix86}
%patch -P 4 -p1
@ -271,6 +266,9 @@ make test
%endif
%changelog
* Thu Jul 13 2023 Zuzana Miklankova <zmiklank@redhat.com> - 3.42.0-3
- remove patch2 - no-malloc-usable-size, #801981
* Thu Jul 13 2023 Zuzana Miklankova <zmiklank@redhat.com> - 3.42.0-2
- Updated to version 3.42.0 (https://sqlite.org/releaselog/3_42_0.html)