<html><head></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div id="ydp5803716byahoo_quoted_7814417716" class="ydp5803716byahoo_quoted">> You can avoid the free() if you HAVE_ALLOCA with<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;"><div><div id="ydp5803716byiv2019423405"><div><div dir="ltr"><div class="ydp5803716byiv2019423405gmail_quote" dir="ltr" data-setdir="false"><div><br clear="none"></div><div><div>>        t_atom* at = (t_atom*)alloca(ac * sizeof(t_atom));</div><div></div></div><div><br></div><div dir="ltr" data-setdir="false">If the user can control ac, then you have likely introduced a potential crasher just to avoid a call to free.</div><div><br></div><div dir="ltr" data-setdir="false">Systemd had a cve from using alloca awhile back. Pd recently fixed a crasher due to alloca. In neither case was alloca necessary.</div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">I'd strongly advise to avoid it in general.<br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">In fact, the next time I get on a Windows machine I bet I can create a trivial Pd patch to blow the stack using only `[list prepend]` and `[list fromsymbol]`. If so it will be 100% due to alloca, and an ostensibly defensive use of it at that. (Have a look at the code for the ATOMS_ALLOCA macro if someone wants to beat me to it.)<br></div><div dir="ltr" data-setdir="false"><br></div><div dir="ltr" data-setdir="false">Best,<br></div><div dir="ltr" data-setdir="false">Jonathan<br></div></div></div></div></div></div>
            </div>
        </div></div></body></html>