Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matthew Finkel
tor-browser-build
Commits
b16662aa
Verified
Commit
b16662aa
authored
Sep 19, 2019
by
boklm
Browse files
Bug 31646: Update abicheck to require GLIBCXX_3.4.25
This is also fixing bug 31380.
parent
3b899b76
Changes
2
Hide whitespace changes
Inline
Side-by-side
projects/firefox/abicheck.cc
View file @
b16662aa
/*
* 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
;
}
projects/gcc/config
View file @
b16662aa
# 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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment