<p> Attention is currently required from: Joshua Colp. </p>
<p><a href="https://gerrit.asterisk.org/c/asterisk/+/19474">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="null">File main/xmldoc.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/19474/comment/d317092a_1929b882">Patch Set #2, Line 3014:</a> <code style="font-family:monospace,monospace"> xmldoc_purge_documentation();</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">There is an existing comment in the code: […]</blockquote></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">I wish the comment elaborated on what changes were envisioned at the time, but I don't see anywhere how references to xmldoc_tree could escape outside of this file, no (e.g. xmldoc_get_node is static). Documentation can be safely reloaded without causing a crash, as long as the list locks are held.<br> <br>The one possible case that may stand out is stuff like here: https://github.com/asterisk/asterisk/blob/38f9000fcbf5f0819b14006c9f5cd5c728a37d8f/main/xmldoc.c#L1253<br> <br>The list lock is held inside xmldoc_get_node, but then it returns the node which _ast_xmldoc_build_syntax uses. In theory there is a small chance of an issue there, since the list lock is released while something in it is being used.<br> <br>I think it could be fixed by simply holding the list lock until _ast_xmldoc_build_syntax returns. I don't see any benefit or need for adding ref counting with just this case.</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/19474">change 19474</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/c/asterisk/+/19474"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I4f265b0e5517e757c5453a0f241201a5788d3a07 </div>
<div style="display:none"> Gerrit-Change-Number: 19474 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: N A <asterisk@phreaknet.org> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Attention: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 05 Nov 2022 13:45:28 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>