<p><a href="https://gerrit.asterisk.org/10294">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/#/c/10294/1/main/astobj2.c">File main/astobj2.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/10294/1/main/astobj2.c@50">Patch Set #1, Line 50:</a> <code style="font-family:monospace,monospace">struct __priv_data {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">FYI […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Even smaller for the default build where AO2_DEBUG is not enabled.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/10294/1/main/astobj2.c@60">Patch Set #1, Line 60:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">        /*! The ao2 object option flags */<br>    uint32_t options:2;<br>   /*! magic number.  This is used to verify that a pointer passed in is a<br>        *  valid astobj2 or ao2_weak reference */<br>    uint32_t magic:30;<br></pre></blockquote></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">FYI […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">That means random bytes have a 1 in 500 million chance of matching the 29-bit check.  Really I think we're fine as long as magic check is at least 20-bits, so if we needed more options flags we could just take more bits from magic.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/10294">change 10294</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/10294"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Idc1baabb35ec3b3d8de463c4fa3011eaf7fcafb5 </div>
<div style="display:none"> Gerrit-Change-Number: 10294 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 27 Sep 2018 22:13:23 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>