<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 9, 2009, at 6:11 PM, Zhongxing Xu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">2009/11/10 Ted Kremenek <<a href="mailto:kremenek@apple.com">kremenek@apple.com</a>>:<br><blockquote type="cite">I wasn't arguing that we make the check malloc() specific, and I don't think<br></blockquote><blockquote type="cite">we should because the problem is more general than just looking at pointers<br></blockquote><blockquote type="cite">returned from malloc(). We just need to make it smart enough that when it<br></blockquote><blockquote type="cite">gives a warning, it is:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(a) correct most of the time<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">(b) gives a meaningful diagnostic that people understand how they screwed up<br></blockquote><blockquote type="cite">and how they can fix the issue<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I don't think we need to make it malloc() specific, but we can educate the<br></blockquote><blockquote type="cite">check about malloc() if that helps accomplish (a) and (b).<br></blockquote><br>Make sense. Let's start with malloc. I'm fine to remove this too general check.<br></span></blockquote></div><br><div>I think we should just grind the check over real code first to get idea of when it fires. That should be a superset of the cases we care about.</div></body></html>