Hello community,

here is the log from the commit of package mariadb for openSUSE:Factory checked 
in at 2020-03-24 22:29:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mariadb (Old)
 and      /work/SRC/openSUSE:Factory/.mariadb.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mariadb"

Tue Mar 24 22:29:53 2020 rev:94 rq:787646 version:10.4.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/mariadb/mariadb.changes  2020-03-12 
22:58:53.639004788 +0100
+++ /work/SRC/openSUSE:Factory/.mariadb.new.3160/mariadb.changes        
2020-03-24 22:30:07.325022365 +0100
@@ -1,0 +2,6 @@
+Tue Mar 24 05:46:49 UTC 2020 - Martin Liška <[email protected]>
+
+- Add mariadb-10.5-fix-prevent-optimizing-out-buf-argument-in-ch.patch
+  in order to fix boo#1158405 (MDEV-21248).
+
+-------------------------------------------------------------------

New:
----
  mariadb-10.5-fix-prevent-optimizing-out-buf-argument-in-ch.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mariadb.spec ++++++
--- /var/tmp/diff_new_pack.Us6duv/_old  2020-03-24 22:30:10.285023852 +0100
+++ /var/tmp/diff_new_pack.Us6duv/_new  2020-03-24 22:30:10.289023854 +0100
@@ -84,6 +84,7 @@
 Patch9:         mariadb-10.2.19-link-and-enable-c++11-atomics.patch
 Patch10:        mariadb-10.4.12-harden_setuid.patch
 Patch11:        mariadb-10.4.12-fix-install-db.patch
+Patch12:        
mariadb-10.5-fix-prevent-optimizing-out-buf-argument-in-ch.patch
 # needed for bison SQL parser and wsrep API
 BuildRequires:  bison
 BuildRequires:  cmake
@@ -370,6 +371,7 @@
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 cp %{_sourcedir}/suse-test-run .
 


++++++ mariadb-10.5-fix-prevent-optimizing-out-buf-argument-in-ch.patch ++++++
>From 35c277851972267d4d020126ab8f893c4b17dd36 Mon Sep 17 00:00:00 2001
From: Martin Liska <[email protected]>
Date: Sun, 8 Dec 2019 10:52:27 +0100
Subject: [PATCH] MDEV-21248: Prevent optimizing out buf argument in
 check_stack_overrun.

When using LTO, one can see optimization of stack variables that
are passed to check_stack_overrun as argument buf. That prevents
proper stack overrun detection.
---
 sql/sql_parse.cc | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index dc81e8a2b91..6f3c076709a 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -7392,8 +7392,17 @@ long max_stack_used;
     corresponding exec. (Thus we only have to check in fix_fields.)
   - Passing to check_stack_overrun() prevents the compiler from removing it.
 */
-bool check_stack_overrun(THD *thd, long margin,
-                        uchar *buf __attribute__((unused)))
+
+bool
+#ifdef __GNUC__
+/*
+  Do not optimize the function in order to preserve a stack variable creation.
+  Otherwise, the variable pointed as "buf" can be removed due to a missing
+  usage.
+ */
+__attribute__((optimize("-O0")))
+#endif
+check_stack_overrun(THD *thd, long margin, uchar *buf __attribute__((unused)))
 {
   long stack_used;
   DBUG_ASSERT(thd == current_thd);
-- 
2.25.1


Reply via email to