Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

g++-4.9 does not properly throw/catch exceptions on Sierra #7837

Closed
poulson opened this issue Dec 14, 2016 · 4 comments
Closed

g++-4.9 does not properly throw/catch exceptions on Sierra #7837

poulson opened this issue Dec 14, 2016 · 4 comments
Labels
legacy Relates to a versioned @ formula

Comments

@poulson
Copy link

poulson commented Dec 14, 2016

Homebrew g++-4.9 does not properly throw/catch exceptions on Sierra. For example, compiling

#include <stdexcept>
int main( int argc, char* argv[] )
{
    try { throw std::logic_error("LogicError"); }
    catch( std::exception& e ) { }
    return 0;
}

via g++-4.9 exception.cpp -o exception and running ./exception produces the output Abort trap: 6.

brew config output:

HOMEBREW_VERSION: 1.1.4
ORIGIN: https://github.com/Homebrew/brew
HEAD: 99f42146c06333f820f45ed1940c5487990e2b31
Last commit: 6 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 16c4d6bbdbde636adc836c4826d7b52df894447d
Core tap last commit: 4 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.0.0-p648
Clang: 8.0 build 800
Git: 2.9.3 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: N/A
macOS: 10.12.1-x86_64
Xcode: 8.1
CLT: 8.1.0.0.1.1476494586
X11: 2.7.11 => /opt/X11

brew doctor output:

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Your Xcode (8.1) is outdated.
Please update to Xcode 8.2 (or delete it).
Xcode can be updated from the App Store.
@tschoonj
Copy link
Contributor

Does this also occur with newer versions of gcc (5 and 6)? gcc 4.9 is getting pretty old, and I doubt that they will produce another bugfix release.

@poulson
Copy link
Author

poulson commented Dec 14, 2016

Unfortunately 5.x and 6.x appear to have a much more subtle 16-byte stack alignment issue when -O3 optimizations are enabled: elemental/Elemental#181.

But I have not yet manually compiled GCC 4.9 to ensure that the current issue isn't caused by homebrew (e.g., by having one of GCC's dependencies built by Clang with an incompatible ABI).

@MikeMcQuaid
Copy link
Member

But I have not yet manually compiled GCC 4.9 to ensure that the current issue isn't caused by homebrew (e.g., by having one of GCC's dependencies built by Clang with an incompatible ABI).

Please do that, thanks!

@ilovezfs ilovezfs added the legacy Relates to a versioned @ formula label Dec 29, 2016
@MikeMcQuaid
Copy link
Member

Closing due to no response and us being unable to support old versions sufficiently.

@Homebrew Homebrew locked and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
legacy Relates to a versioned @ formula
Projects
None yet
Development

No branches or pull requests

4 participants