[Asterisk-code-review] astobj2: Add backtrace to log bad ao2. (asterisk[master])
Corey Farrell
asteriskteam at digium.com
Thu Sep 29 01:47:27 CDT 2016
Corey Farrell has posted comments on this change.
Change subject: astobj2: Add backtrace to log_bad_ao2.
......................................................................
Patch Set 1:
(1 comment)
https://gerrit.asterisk.org/#/c/3927/1/main/utils.c
File main/utils.c:
PS1, Line 2441: fprintf(stderr, "FRACK!, Failed assertion %s (%d) at line %d in %s of %s\n",
: condition_str, condition, line, function, file);
: ast_log(__LOG_ERROR, file, line, function, "FRACK!, Failed assertion %s (%d)\n",
: condition_str, condition);
> Why did you need to swap these statements?
The idea is that when __ast_assert_failed is run the process may be unstable. ast_log causes multiple allocations, uses thread storage and vsnprintf (via ast_str_set_va). This reorder is done on the belief that it's possible for fprintf to succeed when ast_log would crash, but the reverse is very unlikely.
Let me know if you want me to:
* Return to original order of ast_log then fprintf
* Keep the reorder as is but for master only
* Split this reorder to a separate commit and cherry-pick to 13 / 14
--
To view, visit https://gerrit.asterisk.org/3927
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I48f1af44b2718ad74a421ff75cb6397b924a9751
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list