<p>Paulo Vicentini <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/10601">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res/res_pjsip: Fix crash due to misuse of session->media between threads.<br><br>This patch makes sure that thread running ast_taskprocessor_execute<br>cannot suddenly dispose the session->media object making the other<br>threads (running pbx_thread / bridge_channel_ind_thread) crash when they<br>try to access the pointer to invalid memory. We were experiencing a crash due<br>to a misuse of session->media container between threads running<br>(bridge_channel_ind_thread/pbx_thread) and the thread running<br>ast_taskprocessor_execute. Depending on the SIP flow (during a disconnection)<br>and the threads' code path, the session->media container was being destroyed<br>(and set to NULL) by the thread running ast_taskprocessor_execute while the<br>thread running t38_framehook_read was still referring to it.<br>Now res_pjsip_t38 is referring a session_media in a datastore.<br><br>ASTERISK-28156<br><br>Change-Id: Ia92e2389b8d804bf205473e92ec06217e87ce237<br>---<br>M include/asterisk/res_pjsip_session.h<br>M res/res_pjsip_session.c<br>M res/res_pjsip_session.exports.in<br>M res/res_pjsip_t38.c<br>4 files changed, 149 insertions(+), 72 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/01/10601/2</pre><p>To view, visit <a href="https://gerrit.asterisk.org/10601">change 10601</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/10601"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: Ia92e2389b8d804bf205473e92ec06217e87ce237 </div>
<div style="display:none"> Gerrit-Change-Number: 10601 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Paulo Vicentini <paulo.vicentini@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Paulo Vicentini <paulo.vicentini@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Torrey Searle <tsearle@gmail.com> </div>