astobj2: Add backtrace to log_bad_ao2.

* Compile __ast_assert_failed unconditionally.
* Use __ast_assert_failed to log messages from log_bad_ao2
* Remove calls to ast_assert(0) that happen after log_bad_ao2 was run.

Change-Id: I48f1af44b2718ad74a421ff75cb6397b924a9751
This commit is contained in:
Corey Farrell
2016-09-16 19:54:07 -04:00
parent 224c295292
commit 2a03575c30
6 changed files with 43 additions and 43 deletions

View File

@@ -848,8 +848,10 @@ int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request,
#define DO_CRASH_NORETURN
#endif
void DO_CRASH_NORETURN __ast_assert_failed(int condition, const char *condition_str,
const char *file, int line, const char *function);
#ifdef AST_DEVMODE
void DO_CRASH_NORETURN __ast_assert_failed(int condition, const char *condition_str, const char *file, int line, const char *function);
#define ast_assert(a) _ast_assert(a, # a, __FILE__, __LINE__, __PRETTY_FUNCTION__)
static void force_inline _ast_assert(int condition, const char *condition_str, const char *file, int line, const char *function)
{