<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/2580/">https://reviewboard.asterisk.org/r/2580/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 1st, 2013, 1:50 a.m. UTC, <b>Russell Bryant</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Soo ... why is this necessary?</pre>
 </blockquote>




 <p>On June 1st, 2013, 9:31 a.m. UTC, <b>wdoekes</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Because it&#39;s broken? When

[X] MALLOC_DEBUG
[X] BETTER_BACKTRACES

memory was allocated with ast_calloc() and free&#39;d with free(). 

If !MALLOC_DEBUG then ast_free==free, and if !BETTER_BACKTRACES then the memory was allocated with regular malloc().

I see now that https://reviewboard.asterisk.org/r/2567/diff/ does the inverse, and replaces the ast_calloc() calls with calloc() instead. That works too.</pre>
 </blockquote>





 <p>On June 2nd, 2013, 12:58 a.m. UTC, <b>Matt Jordan</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">My patch on r2567 was geared only for trunk, so I don&#39;t want to much with the MALLOC_DEBUG code in release branches unless we really, really need it. It&#39;d be easy to backport that change for a release branch if someone really wanted it anyway.

So, if this patch goes into 1.8, we can always block it at 11.

For the patch on r2567, I obviously needed to go with the unadorned memory allocation calls to use the backtrace code in astmm.c. In that case, we could still marshal the memory over to ast_* calls in other places like you&#39;ve done, which is at least more consistent with the memory tracking code.

I&#39;m good with however we want to do this.</pre>
 </blockquote>





 <p>On August 6th, 2013, 12:03 p.m. UTC, <b>wdoekes</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ok. Shall I put it in and block it after 11?</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Works for me!</pre>
<br />










<p>- Matt</p>


<br />
<p>On May 31st, 2013, 8:43 a.m. UTC, wdoekes wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers.</div>
<div>By wdoekes.</div>


<p style="color: grey;"><i>Updated May 31, 2013, 8:43 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
Asterisk
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ast_bt_get_symbols can return either an ast_malloc&#39;d or a regular malloc&#39;d list, depending on the value of BETTER_BACKTRACES.

The result was always free&#39;d (not ast_free&#39;d).

This patch:
 - copies the malloc&#39;d list from backtrace_symbols into ast_malloc&#39;d memory,
 - replaces the free&#39;s with ast_free&#39;s,
 - documents that the ast_bt_get_symbols return value should be freed.

Unsure whether to put it in 1.8, since ast_bt_get_symbols() might be used by an external module.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Compile tested only.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/trunk/main/utils.c <span style="color: grey">(390180)</span></li>

 <li>/trunk/main/logger.c <span style="color: grey">(390180)</span></li>

 <li>/trunk/main/astobj2.c <span style="color: grey">(390180)</span></li>

 <li>/trunk/include/asterisk/logger.h <span style="color: grey">(390180)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/2580/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>