Now that _debug_assert_fail() has the noreturn attribute, it is better
that execution truly never returns. Not just for sake of silencing the
warning, but because the code at the return IP address may be invalid or
lead to inconsistent results.
This removes support for the GALLIUM_ABORT_ON_ASSERT debugging
environment variable, but between the usefulness of
GALLIUM_ABORT_ON_ASSERT and better static code analysis I think better
static code analysis wins.
Reviewed-by: Brian Paul <brianp@vmware.com>
* Abort the program.
*/
#if defined(DEBUG)
-# define os_abort() os_break()
+# define os_abort() do { os_break(); abort(); } while(0)
#else
# define os_abort() abort()
#endif
const char *function)
{
_debug_printf("%s:%u:%s: Assertion `%s' failed.\n", file, line, function, expr);
- if (debug_get_bool_option("GALLIUM_ABORT_ON_ASSERT", TRUE))
- os_abort();
- else
- _debug_printf("continuing...\n");
+ os_abort();
}