-
Notifications
You must be signed in to change notification settings - Fork 522
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
Review the use of assert() in the GPAC codebase #2705
Comments
jeanlf
added a commit
that referenced
this issue
Dec 21, 2023
- use gf_assert and gf_fatal_assert (will always kill the program) - added -fatal-assert option to configure to force all asserts to be fatal - added GPAC_ENABLE_DEBUG and GPAC_ASSERT_FATAL macros - cleanup of several asserts in the process
a first pass was made, and we now have two macros for dev vs "something wrong" asserts. |
rbouqueau
pushed a commit
that referenced
this issue
Feb 1, 2024
- use gf_assert and gf_fatal_assert (will always kill the program) - added -fatal-assert option to configure to force all asserts to be fatal - added GPAC_ENABLE_DEBUG and GPAC_ASSERT_FATAL macros - cleanup of several asserts in the process
gorinje
pushed a commit
to Bevara/Access-open
that referenced
this issue
Mar 20, 2024
- use gf_assert and gf_fatal_assert (will always kill the program) - added -fatal-assert option to configure to force all asserts to be fatal - added GPAC_ENABLE_DEBUG and GPAC_ASSERT_FATAL macros - cleanup of several asserts in the process
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The behaviour of assert() is inconsistent. It depends on compilers e.g. assert()s may be ignored by msvc in Release mode.
This is an issue if we plan to use assert() as a way to stop when something go wrong.
At the same time some assert()s were inserted by developers. They are deemed useful when developing or unit testing.
We need to check the assert() calls and make sure we don't use it in the first case.
The text was updated successfully, but these errors were encountered: