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

Add a panic helper for non-assert aborts. #1212

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

michael-grunder
Copy link
Collaborator

We merged a fix for a "maybe uninitialized" warning in #1209, but there is now a potential double-free.

The reason is that when compiling with NDEBUG our assert macro becomes a no-op, meaning that execution would no longer stop after assert(NULL).

This commit just adds a simple panic macro which will execute regardless of whether NDEBUG is defined or not.

We merged a fix for a "maybe uninitialized" warning in #1209, but after
merging there could actually have then been a double free.

The reason is that when compiling with NDEBUG our assert macro becomes a
no-op, meaning that execution would no longer stop after `assert(NULL)`.

This commit just adds a simple panic macro which will execute regardless
of whether NDEBUG is defined or not.
@michael-grunder michael-grunder merged commit e07ae7d into master Jul 25, 2023
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant