summaryrefslogtreecommitdiff
path: root/lib/c-stack.c
Commit message (Collapse)AuthorAgeFilesLines
* bootstrapped repositoryRichard Maw2012-01-091-0/+1
|
* remove many filesJim Meyering2009-11-111-435/+0
| | | | | Many are now obtained via bootstrap from gnulib. Others (ms/) were not being maintained.
* Include sys/time.h; from Volker Borchert.Paul Eggert2002-07-011-0/+6
|
* (segv_handler, c_stack_action) [! defined SA_SIGINFO]:Paul Eggert2002-06-221-2/+2
| | | | | Do not assume SA_SIGINFO behavior. Bug reported by Jim Meyering on NetBSD 1.5.2.
* Check for HAVE_SIGALTSTACK and HAVE_GETCONTEXT, too.Paul Eggert2002-06-111-4/+4
|
* (__attribute__): New macro.Paul Eggert2002-06-111-100/+292
| | | | | | | | | | | | | | | | | | | | | | | | (EOVERFLOW): Define if not defined.(stack_t): Define to struct sigaltstack if not defined or declared. Include <sys/resource.h>, <ucontext.h> if available. Include <stdio.h> if DEBUG. Do not include <inttypes.h> or <stdint.h>. (c_stack_die): Remove info and context args. All uses changed. (segv_action): Likewise. (alternate_signal_stack): Change uintmax_t to long, to ease porting. (get_stack_location, min_address_from_argv, max_address_from_argv, null_action): New functions. (stack_base, stack_size): New vars. (segv_handler): context arg may not be used. Use global stack_base, stack_size if ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC. Add debug code. Invoke die (rather than segv_action) to exit. (c_stack_action): Accept new argv arg, and simpler handler arg. All uses changed. Move code into new functions above. Allow null action. [! (defined SA_ONSTACK && defined _SC_PAGESIZE)]: Assume all segvs are stack overflows. (main) [DEBUG]: Describe what output should be like.
* (c_stack_die) [!HAVE_SIGINFO_T]: Don't use info.Paul Eggert2002-03-241-0/+2
| | | | Bug reported by Eli Zaretskii.
* Include <errno.h>Paul Eggert2002-03-111-143/+67
| | | | | | | | | | | | | | (ENOTSUP): Define if errno.h doesn't. (SA_NODEFER, SA_ONSTACK, SA_RESETHAND, SA_SIGINFO, SIGSTKSZ, _SC_PAGESIZE, ALTERNATE_STACK_SIZE, stack_t, sigaltstack): Remove; we now assume them all when HAVE_XSI_STACK_OVERFLOW_HEURISTIC, so we don't need substitutes. (<ucontext.h>): Include only if HAVE_XSI_STACK_OVERFLOW_HEURISTIC. (alternate_signal_stack): Now of size SIGSTKSZ, not ALTERNATE_STACK_SIZE. (segv_handler): Simplify, under the assumption that HAVE_XSI_STACK_OVERFLOW_HEURISTIC is nonzero. (c_stack_action): Likewise. (exit_failure) [DEBUG]: Initialize to 0, not 1. (recurse, main) [DEBUG]: Remove main args.
* Initial revisionPaul Eggert2002-02-281-0/+311