[Asterisk-code-review] backtrace: Refactor ast bt get symbols so it doesn't crash (asterisk[16])

George Joseph asteriskteam at digium.com
Fri Nov 9 14:14:18 CST 2018


Hello Richard Mudgett, Jenkins2, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/10606

to look at the new patch set (#4).

Change subject: backtrace:  Refactor ast_bt_get_symbols so it doesn't crash
......................................................................

backtrace:  Refactor ast_bt_get_symbols so it doesn't crash

We've been seeing crashes in libbfd when we attempt to generate
a stack trace from multiple threads.  It turns out that libbfd
is NOT thread-safe.  It can cache the bfd structure and give it to
multiple threads without protecting itself.  To get around this,
we've added a global mutex around the bfd functions and also have
refactored the use of those functions to be more efficient and
to provide more information about inlined functions.

Also added a few more tests to test_pbx.c.  One just calls
ast_assert() and the other calls ast_log_backtrace().  Neither are
run by default.

WARNING:  This change necessitated changing the return value of
ast_bt_get_symbols() from an array of strings to a VECTOR of
strings.  However, the use of this function outside Asterisk is not
likely.

ASTERISK-28140

Change-Id: I79d02862ddaa2423a0809caa4b3b85c128131621
---
M CHANGES
M UPGRADE.txt
M include/asterisk/backtrace.h
M main/astmm.c
M main/backtrace.c
M main/logger.c
M main/utils.c
M tests/test_pbx.c
M utils/ael_main.c
M utils/check_expr.c
M utils/conf2ael.c
11 files changed, 332 insertions(+), 180 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/06/10606/4
-- 
To view, visit https://gerrit.asterisk.org/10606
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I79d02862ddaa2423a0809caa4b3b85c128131621
Gerrit-Change-Number: 10606
Gerrit-PatchSet: 4
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181109/4ee26dc4/attachment-0001.html>


More information about the asterisk-code-review mailing list