<p>Richard Mudgett <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7737">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">loader: Add volatile to resource_being_loaded.<br><br>Some compiler optimizers seem to assume that dlopen will not use<br>__attribute__((constructor)) functions to call back to the program.<br>This was causing resource_being_loaded to be optimized away completely.<br><br>ASTERISK-27531 #close<br>Tested By: abelbeck<br><br>Change-Id: If17a3b889e06811a0e7119f0539d052494d6ece9<br>(cherry picked from commit 92fb393cab7fbd164e299601e94909ba95a0116b)<br>---<br>M main/loader.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/loader.c b/main/loader.c<br>index c18fb37..b9baf3e 100644<br>--- a/main/loader.c<br>+++ b/main/loader.c<br>@@ -202,7 +202,7 @@<br> *<br> * This is protected by the module_list lock.<br> */<br>-static struct ast_module *resource_being_loaded;<br>+static struct ast_module * volatile resource_being_loaded;<br> <br> /*!<br> * \internal<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7737">change 7737</a>. To unsubscribe, 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/7737"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13.19 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If17a3b889e06811a0e7119f0539d052494d6ece9 </div>
<div style="display:none"> Gerrit-Change-Number: 7737 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>