Skip to content

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

@ssoelvsten

Description

@ssoelvsten

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions