public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jory Pratt" <anarchy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/firefox/files/, www-client/firefox/
Date: Mon,  9 Dec 2019 23:52:20 +0000 (UTC)	[thread overview]
Message-ID: <1575935531.c40cc87ed9378492d84a2c6c5e45fa3d399ba7a2.anarchy@gentoo> (raw)

commit:     c40cc87ed9378492d84a2c6c5e45fa3d399ba7a2
Author:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  9 23:51:50 2019 +0000
Commit:     Jory Pratt <anarchy <AT> gentoo <DOT> org>
CommitDate: Mon Dec  9 23:52:11 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c40cc87e

www-client/firefox: Fix segfault with gcc lto builds

Closes: https://bugs.gentoo.org/show_bug.cgi?id=701866
Package-Manager: Portage-2.3.81, Repoman-2.3.20
Signed-off-by: Jory Pratt <anarchy <AT> gentoo.org>

 .../files/mozilla-bug1601707-gcc-fixup.patch       | 114 +++++++++++++++++++++
 www-client/firefox/firefox-71.0.ebuild             |   1 +
 2 files changed, 115 insertions(+)

diff --git a/www-client/firefox/files/mozilla-bug1601707-gcc-fixup.patch b/www-client/firefox/files/mozilla-bug1601707-gcc-fixup.patch
new file mode 100644
index 00000000000..7002c6d70b7
--- /dev/null
+++ b/www-client/firefox/files/mozilla-bug1601707-gcc-fixup.patch
@@ -0,0 +1,114 @@
+diff -up firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround firefox-71.0/dom/indexedDB/ActorsParent.cpp
+--- firefox-71.0/dom/indexedDB/ActorsParent.cpp.gcc-workaround	2019-12-02 13:22:58.000000000 +0100
++++ firefox-71.0/dom/indexedDB/ActorsParent.cpp	2019-12-08 21:52:54.449199120 +0100
+@@ -24311,11 +24311,11 @@ nsresult ObjectStoreAddOrPutRequestOp::D
+   // if we allow overwrite or not. By not allowing overwrite we raise
+   // detectable errors rather than corrupting data.
+   DatabaseConnection::CachedStatement stmt;
+-  const auto& optReplaceDirective = (!mOverwrite || keyUnset)
+-                                        ? NS_LITERAL_CSTRING("")
+-                                        : NS_LITERAL_CSTRING("OR REPLACE ");
+   rv = aConnection->GetCachedStatement(
+-      NS_LITERAL_CSTRING("INSERT ") + optReplaceDirective +
++      NS_LITERAL_CSTRING("INSERT ") +
++	  ((!mOverwrite || keyUnset)
++           ? NS_LITERAL_CSTRING("")
++           : NS_LITERAL_CSTRING("OR REPLACE ")) +
+           NS_LITERAL_CSTRING("INTO object_data "
+                              "(object_store_id, key, file_ids, data) "
+                              "VALUES (:") +
+@@ -25869,11 +25869,8 @@ void Cursor::OpenOp::PrepareIndexKeyCond
+     }
+   }
+ 
+-  const auto& comparisonChar =
+-      isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<");
+-
+   mCursor->mContinueToQuery =
+-      aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + comparisonChar +
++      aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") + (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) +
+       NS_LITERAL_CSTRING("= :") + kStmtParamNameCurrentKey;
+ 
+   switch (mCursor->mDirection) {
+@@ -25881,11 +25878,11 @@ void Cursor::OpenOp::PrepareIndexKeyCond
+     case IDBCursor::PREV:
+       mCursor->mContinueQuery =
+           aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") +
+-          comparisonChar + NS_LITERAL_CSTRING("= :") +
++          (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING("= :") +
+           kStmtParamNameCurrentKey + NS_LITERAL_CSTRING(" AND ( sort_column ") +
+-          comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
++          (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
+           NS_LITERAL_CSTRING(" OR ") + aObjectDataKeyPrefix +
+-          NS_LITERAL_CSTRING("object_data_key ") + comparisonChar +
++          NS_LITERAL_CSTRING("object_data_key ") + (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) +
+           NS_LITERAL_CSTRING(" :") + kStmtParamNameObjectStorePosition +
+           NS_LITERAL_CSTRING(" ) ");
+ 
+@@ -25896,12 +25893,12 @@ void Cursor::OpenOp::PrepareIndexKeyCond
+               "(sort_column == :") +
+           kStmtParamNameCurrentKey + NS_LITERAL_CSTRING(" AND ") +
+           aObjectDataKeyPrefix + NS_LITERAL_CSTRING("object_data_key ") +
+-          comparisonChar + NS_LITERAL_CSTRING("= :") +
++          (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING("= :") +
+           kStmtParamNameObjectStorePosition +
+           NS_LITERAL_CSTRING(
+               ") OR "
+               "sort_column ") +
+-          comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
++          (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey +
+           NS_LITERAL_CSTRING(")");
+       break;
+ 
+@@ -25909,7 +25906,7 @@ void Cursor::OpenOp::PrepareIndexKeyCond
+     case IDBCursor::PREV_UNIQUE:
+       mCursor->mContinueQuery =
+           aQueryStart + NS_LITERAL_CSTRING(" AND sort_column ") +
+-          comparisonChar + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey;
++          (isIncreasingOrder ? NS_LITERAL_CSTRING(">") : NS_LITERAL_CSTRING("<")) + NS_LITERAL_CSTRING(" :") + kStmtParamNameCurrentKey;
+       break;
+ 
+     default:
+@@ -26076,9 +26073,6 @@ nsresult Cursor::OpenOp::DoIndexDatabase
+ 
+   const bool usingKeyRange = mOptionalKeyRange.isSome();
+ 
+-  const auto& indexTable = mCursor->mUniqueIndex
+-                               ? NS_LITERAL_CSTRING("unique_index_data")
+-                               : NS_LITERAL_CSTRING("index_data");
+ 
+   NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column");
+ 
+@@ -26099,7 +26093,9 @@ nsresult Cursor::OpenOp::DoIndexDatabase
+                                  "object_data.file_ids, "
+                                  "object_data.data "
+                                  "FROM ") +
+-                             indexTable +
++                             (mCursor->mUniqueIndex
++                                 ? NS_LITERAL_CSTRING("unique_index_data")
++                                 : NS_LITERAL_CSTRING("index_data")) +
+                              NS_LITERAL_CSTRING(
+                                  " AS index_table "
+                                  "JOIN object_data "
+@@ -26198,9 +26194,6 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
+ 
+   const bool usingKeyRange = mOptionalKeyRange.isSome();
+ 
+-  const auto& table = mCursor->mUniqueIndex
+-                          ? NS_LITERAL_CSTRING("unique_index_data")
+-                          : NS_LITERAL_CSTRING("index_data");
+ 
+   NS_NAMED_LITERAL_CSTRING(sortColumn, "sort_column");
+ 
+@@ -26218,7 +26211,10 @@ nsresult Cursor::OpenOp::DoIndexKeyDatab
+                              NS_LITERAL_CSTRING(
+                                  "object_data_key "
+                                  " FROM ") +
+-                             table + NS_LITERAL_CSTRING(" WHERE index_id = :") +
++                             (mCursor->mUniqueIndex
++                                 ? NS_LITERAL_CSTRING("unique_index_data")
++                                 : NS_LITERAL_CSTRING("index_data")) +
++                             NS_LITERAL_CSTRING(" WHERE index_id = :") +
+                              kStmtParamNameId;
+ 
+   const auto keyRangeClause =

diff --git a/www-client/firefox/firefox-71.0.ebuild b/www-client/firefox/firefox-71.0.ebuild
index 889b6dec68a..431c1e1f9d7 100644
--- a/www-client/firefox/firefox-71.0.ebuild
+++ b/www-client/firefox/firefox-71.0.ebuild
@@ -270,6 +270,7 @@ src_prepare() {
 	use !wayland && rm -f "${WORKDIR}/firefox/2019_mozilla-bug1539471.patch"
 	eapply "${WORKDIR}/firefox"
 	eapply "${FILESDIR}/${PN}-69.0-lto-gcc-fix.patch"
+	eapply "${FILESDIR}/mozilla-bug1601707-gcc-fixup.patch"
 
 	# Allow user to apply any additional patches without modifing ebuild
 	eapply_user


             reply	other threads:[~2019-12-09 23:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-09 23:52 Jory Pratt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-14 12:40 [gentoo-commits] repo/gentoo:master commit in: www-client/firefox/files/, www-client/firefox/ Joonas Niilola
2023-06-20 21:16 Georgy Yakovlev
2022-03-12 18:55 Piotr Karbowski
2022-02-10 17:10 Joonas Niilola
2022-02-09 23:21 Piotr Karbowski
2021-12-17  9:06 Joonas Niilola
2020-10-23  0:53 Thomas Deutschmann
2020-03-30 11:46 Thomas Deutschmann
2020-02-16  3:07 Jory Pratt
2019-11-08 12:52 Thomas Deutschmann
2018-10-31 21:29 Thomas Deutschmann
2018-10-04 13:50 Thomas Deutschmann
2018-09-28 12:00 Thomas Deutschmann
2018-09-28 11:44 Thomas Deutschmann
2018-09-23  1:31 Thomas Deutschmann
2018-07-08 22:03 Jory Pratt
2018-04-25 10:21 Lars Wendler
2018-01-06  0:39 Ian Stakenvicius
2017-08-08 12:24 Lars Wendler
2017-05-19 19:44 Ian Stakenvicius
2017-01-30  3:02 Jory Pratt
2017-01-08 21:42 Jory Pratt
2015-11-27  0:08 Jory Pratt
2015-10-06 17:21 Ian Stakenvicius

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1575935531.c40cc87ed9378492d84a2c6c5e45fa3d399ba7a2.anarchy@gentoo \
    --to=anarchy@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox