Skip to content

macOS on Intel: floating point exception in munit_rand_int_range(), but only inside a test #94

@plexilcrf

Description

@plexilcrf

Platform: macOS 12.6.7, MacBook Pro (16-inch, 2019), Intel i9 CPU, clang 13.1.6.

A helper function which calls munit_rand_int_range(), called from a test, is raising signal 8 (SIGFPE, floating point exception).

If I call the function from main(), prior to calling munit_suite_main() (i.e. outside the munit test environment), no problems are apparent when run from the command line, and the test suite runs normally (until the test in question).

However, when running the same executable under lldb, all of the tests in the suite report ERROR.

Under lldb, single-stepping through munit_rand_int_range() prior to calling munit_suite_main() doesn't seem to raise the signal. Breakpoints seem to be ignored inside a test. So I'm unable to debug further.

The problem does not seem to occur in the munit example.c.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions