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

Does not Catch Exceptions (Mac, GCC 13.2.0) #172

Open
SSoelvsten opened this issue May 7, 2024 · 1 comment
Open

Does not Catch Exceptions (Mac, GCC 13.2.0) #172

SSoelvsten opened this issue May 7, 2024 · 1 comment

Comments

@SSoelvsten
Copy link

SSoelvsten commented May 7, 2024

After I updated the compiler versions for Mac on my research project to also include GCC v.13.2.0, the unit test executable terminates early due to an (expected) exception:

terminate called after throwing an instance of 'std::invalid_argument'
  what():  Adiar requires at least 128 MiB of memory

11155 Abort trap: 6           ./test/test-adiar --reporter=info --colorizer=light

The unit test in question is a simple test for this very exception:

    it("throws exception when given '0' memory",
       [&]() { AssertThrows(invalid_argument, adiar_init(0)); });

As far as I know, even if the AssertThrows wasn't there, the it(...) ought to have caught the exception?

Additional Observations

My personal machine runs Fedora with GCC 3.2.1 . Here, there are no issues. Earlier versions of GCC and all current versions of Clang work as expected on Mac. So, my best guess is it is a bug in this particular compiler version.

So, most likely, this issue is a wontfix. But, as long as this versions of GCC is the default with Homebrew, it might be good to have it on record as an issue.

@SSoelvsten SSoelvsten changed the title Does not Catch Exceptions (Mac / GCC 13.2.0) Does not Catch Exceptions (Mac, GCC 13.2.0) May 7, 2024
@SSoelvsten
Copy link
Author

SSoelvsten commented May 28, 2024

This pull request on my research project instead shows this is because the header-only branch is out of date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant