<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div><br>I'm not sure I understand what you mean.<br><br>It seems unfortunate to me to build fixed memory limits into programs - it's nice if they scale up with bigger inputs and more memory on the machine to do more of whatever it is they do - only limited by the memory available on the machine, not some fixed limit in the program.<br><br>If this means making programs robust to allocation failure (failing gracefully rather than 'crashing') for them to be fuzzable - that seems, to me at least, an OK tradeoff.<br></div></div></div></blockquote><div><br></div><div>This is subtle, but let me try again.</div><div>1. IMHO any code that tries to recover from malloc (or new!!) returning nullptr is much more complicated than adding an artificial limit as a flag (by default the flag could be arbitrarily large). <br></div><div>It's also much harder to test. </div><div>2. malloc is not guaranteed to return nullptr even in cases when there is actually not enough memory. It may instead return something backed by swap and this can easily kill your machine. </div><div><br></div><div><br></div><div> </div></div></div></div>