<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 05.04.2013 3:52, Jordan Rose wrote:<br>
    </div>
    <blockquote
      cite="mid:4B26986C-C6B8-4A04-A66D-1F3790A69541@apple.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <br>
      <div>
        <div>On Apr 4, 2013, at 16:46 , Anton Yartsev <<a
            moz-do-not-send="true" href="mailto:anton.yartsev@gmail.com">anton.yartsev@gmail.com</a>>
          wrote:</div>
        <br class="Apple-interchange-newline">
        <blockquote type="cite"><span style="font-family: monospace;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+  if (Family == AF_Malloc &&</span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+    (!Filter.CMallocOptimistic &&
            !Filter.CMallocPessimistic))</span><br style="font-family:
            monospace; font-size: medium; font-style: normal;
            font-variant: normal; font-weight: normal; letter-spacing:
            normal; line-height: normal; orphans: 2; text-align:
            -webkit-auto; text-indent: 0px; text-transform: none;
            white-space: normal; widows: 2; word-spacing: 0px;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+    return false;</span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+</span><br style="font-family: monospace;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+  if ((Family == AF_CXXNew || Family ==
            AF_CXXNewArray) &&</span><br style="font-family:
            monospace; font-size: medium; font-style: normal;
            font-variant: normal; font-weight: normal; letter-spacing:
            normal; line-height: normal; orphans: 2; text-align:
            -webkit-auto; text-indent: 0px; text-transform: none;
            white-space: normal; widows: 2; word-spacing: 0px;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+    !Filter.CNewDeleteChecker)</span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+    return false;</span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+</span><br style="font-family: monospace;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+  return true;</span><br style="font-family:
            monospace; font-size: medium; font-style: normal;
            font-variant: normal; font-weight: normal; letter-spacing:
            normal; line-height: normal; orphans: 2; text-align:
            -webkit-auto; text-indent: 0px; text-transform: none;
            white-space: normal; widows: 2; word-spacing: 0px;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+}</span><br style="font-family: monospace;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+</span><br style="font-family: monospace;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+bool
            MallocChecker::isTrackedFamily(CheckerContext &C,<span
              class="Apple-converted-space"> </span></span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+                                    const
            Stmt *AllocDeallocStmt) const {</span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+  return
            isTrackedFamily(getAllocationFamily(C, AllocDeallocStmt));</span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+}</span><br style="font-family: monospace;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+</span><br style="font-family: monospace;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+bool
            MallocChecker::isTrackedFamily(CheckerContext &C,
            SymbolRef Sym) const {</span><br style="font-family:
            monospace; font-size: medium; font-style: normal;
            font-variant: normal; font-weight: normal; letter-spacing:
            normal; line-height: normal; orphans: 2; text-align:
            -webkit-auto; text-indent: 0px; text-transform: none;
            white-space: normal; widows: 2; word-spacing: 0px;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+  const RefState *RS =
            C.getState()->get<RegionState>(Sym);</span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+</span><br style="font-family: monospace;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+  return RS ?
            isTrackedFamily(RS->getAllocationFamily())<span
              class="Apple-converted-space"> </span></span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+            : isTrackedFamily(AF_None);</span><br
            style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
          <span style="font-family: monospace; font-size: medium;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; display: inline !important;
            float: none; ">+}</span><br style="font-family: monospace;
            font-size: medium; font-style: normal; font-variant: normal;
            font-weight: normal; letter-spacing: normal; line-height:
            normal; orphans: 2; text-align: -webkit-auto; text-indent:
            0px; text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-text-size-adjust: auto;
            -webkit-text-stroke-width: 0px; ">
        </blockquote>
        <br>
      </div>
      <div>Uh, this is not correct; this will say that AF_None is a
        tracked family, which means any symbol with no RefState has a
        tracked family.</div>
    </blockquote>
    This is made for cases:<br>
    <br>
    int i;<br>
    free(&i);<br>
    <br>
    and similar. <br>
    We may add something like assert(family != AF_None) somewhere else
    if AF_None is not acceptable. How do you think?<br>
    <br>
    <span style="font-family: monospace; font-size: medium; font-style:
      normal; font-variant: normal; font-weight: normal; letter-spacing:
      normal; line-height: normal; orphans: 2; text-align: -webkit-auto;
      text-indent: 0px; text-transform: none; white-space: normal;
      widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
      -webkit-text-stroke-width: 0px; display: inline !important; float:
      none; "></span>
    <blockquote
      cite="mid:4B26986C-C6B8-4A04-A66D-1F3790A69541@apple.com"
      type="cite">
      <div><br>
      </div>
      <div>A (fully-covered) switch statement might also be safer than
        the series of ifs, because then we won't forget to update it
        later.</div>
    </blockquote>
    Committed at r178820.<br>
    <blockquote
      cite="mid:4B26986C-C6B8-4A04-A66D-1F3790A69541@apple.com"
      type="cite">
      <div><br>
      </div>
      <div>Jordan</div>
      <br>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Anton</pre>
  </body>
</html>