<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7733">View Change</a></p><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>---<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;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/33/7733/1</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/7733">change 7733</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/7733"/><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: newchange </div>
<div style="display:none"> Gerrit-Change-Id: If17a3b889e06811a0e7119f0539d052494d6ece9 </div>
<div style="display:none"> Gerrit-Change-Number: 7733 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>