[tbb-commits] [tor-browser-build/master] Bug 31646: Update abicheck to require GLIBCXX_3.4.25
gk at torproject.org
gk at torproject.org
Fri Sep 20 10:53:50 UTC 2019
commit b16662aad8d9932819fea73746860ce9d8c711a4
Author: Nicolas Vigier <boklm at torproject.org>
Date: Thu Sep 19 19:13:25 2019 +0200
Bug 31646: Update abicheck to require GLIBCXX_3.4.25
This is also fixing bug 31380.
---
projects/firefox/abicheck.cc | 40 ++++++++++++++--------------------------
projects/gcc/config | 3 +++
2 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/projects/firefox/abicheck.cc b/projects/firefox/abicheck.cc
index cbecafa..ba5f858 100644
--- a/projects/firefox/abicheck.cc
+++ b/projects/firefox/abicheck.cc
@@ -1,35 +1,23 @@
/*
* Bug 25485: Browser/TorBrowser/Tor/libstdc++.so.6: version `CXXABI_1.3.11' not found
- * This program is borrowed from
- * https://en.cppreference.com/w/cpp/error/uncaught_exception and is useful in
- * determining the latest C++ ABI. Specifically this program requires
- * `GLIBCXX_3.4.22` which we use to compare the version of the installed
- * libstdc++.so.6 and the bundled version. If the program executes
- * successfully, that means we should use the system version of libstdc++.so.6
- * and if not, that means we should use the bundled version.
+ * Bug 31646: Update abicheck to require newer libstdc++.so.6
+ * This program is useful in determining if the libstdc++.so.6 installed
+ * on the system is recent enough. Specifically this program requires
+ * `GLIBCXX_3.4.25` which should be provided by libstdc++.so.6 from
+ * gcc >= 8.0.0. If the program executes successfully, that means we
+ * should use the system version of libstdc++.so.6 and if not, that means
+ * we should use the bundled version.
+ *
+ * We use std::random_device::entropy() in order to require GLIBCXX_3.4.25:
+ * https://github.com/gcc-mirror/gcc/blob/gcc-8_3_0-release/libstdc%2B%2B-v3/config/abi/pre/gnu.ver#L1978
*/
#include <iostream>
-#include <exception>
-#include <stdexcept>
-
-struct Foo {
- int count = std::uncaught_exceptions();
- ~Foo() {
- std::cout << (count == std::uncaught_exceptions()
- ? "~Foo() called normally\n"
- : "~Foo() called during stack unwinding\n");
- }
-};
+#include <random>
int main()
{
- Foo f;
- try {
- Foo f;
- std::cout << "Exception thrown\n";
- throw std::runtime_error("test exception");
- } catch (const std::exception& e) {
- std::cout << "Exception caught: " << e.what() << '\n';
- }
+ std::random_device rd;
+ std::cout << "entropy: " << rd.entropy() << std::endl;
+ return 0;
}
diff --git a/projects/gcc/config b/projects/gcc/config
index d776a2c..a56089a 100644
--- a/projects/gcc/config
+++ b/projects/gcc/config
@@ -1,5 +1,8 @@
# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
+# Note: When updating the gcc version, if this includes a libstdc++
+# ABI change we should also update projects/firefox/abicheck.cc to
+# require the new version.
version: 8.3.0
var:
container:
More information about the tbb-commits
mailing list