<div>The standard says the behaviour is implementation defined, IIRC (I can quote later).</div><div>It is a valid realloc implementation and we've seen people rely on this (realloc returning a non null pointer for this situation). We need asan to behave like our standard library (and its documentation).</div><div><br></div><div>I can keep this patch private if it's too much of a problem. I figured it could be helpful for other people, though.</div><div><br></div><div>Thank you,</div><div><br></div><div> Filipe</div><div><br></div><div><br></div><div><br><div class="gmail_quote"><div>On Thu, 23 Mar 2017 at 19:05, Kostya Serebryany via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">kcc added a reviewer: alekseyshl.<br class="gmail_msg">
kcc added a comment.<br class="gmail_msg">
<br class="gmail_msg">
I am horrified by the amount of flags we already have, and would like to reduce it, not increase it.<br class="gmail_msg">
Can you please explain in more detaild why anyone would need this behavior and how this behavior matches the C/C++ standard behavior?<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D31295" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D31295</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div></div>