On 10/10/2013 03:40 PM, Piotr Grzybowski wrote: > a small correction, if I may; while that was all very sweet, there > are two issues here: > > 1. recursion_count has to be reset somewhere, or else it is a global > alias limit :) > 2. a better place for this limit is acctually eval (probably leaving > alias recursion limit, before Oliver starts playing with it, is also a > good idea?):
Why impose an arbitrary recursion limit at all? One of the GNU coding philosophies is to avoid arbitrary limits, and instead let you use the full power of your machine (ie. recurse to the full stack depth, rather than a hard-coded limit, where depending on available memory and ulimit settings, different users will want different limits). One way to do this is to link to the GNU libsigsegv library, which can be used to give a graceful error message rather than a core dump upon stack overflow (although gracefully recovering from overflow is a MUCH harder task, unless you can prove that overflow will never happen in the middle of a function such as malloc). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature