On 07/15/2014 03:15 PM, Pavel Raiskup wrote: > Out of curiosity, Paul, could you point me to some (preferably GNU) > project trapping segfaults in a portable way?
GNU libsigsegv is designed as a library that you can use in your own projects for just this purpose. At least GNU m4 and GNU awk use libsigsegv to give the user a nicer exit on stack overflow (since in programs that are designed to interpret user input and where the user input can cause recursion, trapping segv is the only sane thing to do to give a nicer user error message, because predicting in advance whether all possible user inputs will fit in a limited stack would be equivalent to solving the Halting Problem). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
