This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.57. Invocation command line was $ ./configure --prefix=/usr --enable-shared=yes --enable-static=yes ## --------- ## ## Platform. ## ## --------- ## hostname = weirdgear uname -m = sparc uname -r = 2.4.32-gl070220 uname -s = Linux uname -v = #19 SMP Tue Feb 20 22:54:37 EST 2007 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = sparc /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /usr/local/sbin PATH: /usr/sbin PATH: /sbin PATH: /usr/local/bin PATH: /usr/bin PATH: /bin PATH: /usr/X11R6/bin PATH: /usr/games PATH: /opt/www/htdig/bin PATH: /usr/lib/qt/bin PATH: /usr/share/texmf/bin PATH: /opt/kde/bin ## ----------- ## ## Core tests. ## ## ----------- ## configure:1528: checking for a BSD-compatible install configure:1582: result: /usr/bin/ginstall -c configure:1593: checking whether build environment is sane configure:1636: result: yes configure:1669: checking for gawk configure:1685: found /usr/bin/gawk configure:1695: result: gawk configure:1705: checking whether make sets $(MAKE) configure:1725: result: yes configure:1938: checking for gcc configure:1954: found /usr/bin/gcc configure:1964: result: gcc configure:2208: checking for C compiler version configure:2211: gcc --version &5 gcc (GCC) 3.3.6 Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:2214: $? = 0 configure:2216: gcc -v &5 Reading specs from /usr/lib/gcc-lib/sparc-bobware-linux/3.3.6/specs Configured with: ../gcc-3.3.6/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --target=sparc-bobware-linux --host=sparc-bobware-linux Thread model: posix gcc version 3.3.6 configure:2219: $? = 0 configure:2221: gcc -V &5 gcc: `-V' option must have argument configure:2224: $? = 1 configure:2248: checking for C compiler default output configure:2251: gcc -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:2254: $? = 0 configure:2300: result: a.out configure:2305: checking whether the C compiler works configure:2311: ./a.out configure:2314: $? = 0 configure:2331: result: yes configure:2338: checking whether we are cross compiling configure:2340: result: no configure:2343: checking for suffix of executables configure:2345: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:2348: $? = 0 configure:2373: result: configure:2379: checking for suffix of object files configure:2401: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:2404: $? = 0 configure:2426: result: o configure:2430: checking whether we are using the GNU C compiler configure:2455: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:2458: $? = 0 configure:2461: test -s conftest.o configure:2464: $? = 0 configure:2477: result: yes configure:2483: checking whether gcc accepts -g configure:2505: gcc -c -g conftest.c >&5 configure:2508: $? = 0 configure:2511: test -s conftest.o configure:2514: $? = 0 configure:2525: result: yes configure:2542: checking for gcc option to accept ANSI C configure:2603: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:2606: $? = 0 configure:2609: test -s conftest.o configure:2612: $? = 0 configure:2630: result: none needed configure:2648: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 conftest.c:2: error: syntax error before "me" configure:2651: $? = 1 configure: failed program was: | #ifndef __cplusplus | choke me | #endif configure:2771: checking for style of include used by make configure:2799: result: GNU configure:2827: checking dependency style of gcc configure:2895: result: none configure:2917: checking how to run the C preprocessor configure:2953: gcc -E conftest.c configure:2959: $? = 0 configure:2991: gcc -E conftest.c configure:2992:28: ac_nonexistent.h: No such file or directory configure:2997: $? = 1 configure: failed program was: | #line 2982 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | /* end confdefs.h. */ | #include configure:3035: result: gcc -E configure:3060: gcc -E conftest.c configure:3066: $? = 0 configure:3098: gcc -E conftest.c configure:3099:28: ac_nonexistent.h: No such file or directory configure:3104: $? = 1 configure: failed program was: | #line 3089 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | /* end confdefs.h. */ | #include configure:3153: checking build system type configure:3171: result: sparc-unknown-linux-gnu configure:3179: checking host system type configure:3193: result: sparc-unknown-linux-gnu configure:3201: checking host platform configure:3220: result: sparc-unknown-linux2.4.32-gnu-glibc2.3 configure:3237: checking for a BSD-compatible install configure:3291: result: /usr/bin/ginstall -c configure:3391: checking for ld used by GCC configure:3454: result: /usr/sparc-bobware-linux/bin/ld configure:3463: checking if the linker (/usr/sparc-bobware-linux/bin/ld) is GNU ld GNU ld version 2.15.92.0.2 20040927 configure:3475: result: yes configure:3480: checking for /usr/sparc-bobware-linux/bin/ld option to reload object files configure:3487: result: -r configure:3492: checking for BSD-compatible nm configure:3528: result: /usr/bin/nm -B configure:3531: checking for a sed that does not truncate output configure:3613: result: /usr/bin/sed configure:3616: checking whether ln -s works configure:3620: result: yes configure:3627: checking how to recognise dependent libraries configure:3808: result: pass_all configure:3821: checking command to parse /usr/bin/nm -B output configure:3905: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:3908: $? = 0 configure:3912: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGISTW][ABCDGISTW]*\)[ ][ ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' \> conftest.nm configure:3915: $? = 0 configure:3967: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c conftstm.o >&5 configure:3970: $? = 0 configure:4014: result: ok configure:4019: checking for egrep configure:4029: result: grep -E configure:4034: checking for ANSI C header files configure:4060: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4063: $? = 0 configure:4066: test -s conftest.o configure:4069: $? = 0 configure:4161: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4164: $? = 0 configure:4166: ./conftest configure:4169: $? = 0 configure:4184: result: yes configure:4208: checking for sys/types.h configure:4225: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4228: $? = 0 configure:4231: test -s conftest.o configure:4234: $? = 0 configure:4245: result: yes configure:4208: checking for sys/stat.h configure:4225: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4228: $? = 0 configure:4231: test -s conftest.o configure:4234: $? = 0 configure:4245: result: yes configure:4208: checking for stdlib.h configure:4225: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4228: $? = 0 configure:4231: test -s conftest.o configure:4234: $? = 0 configure:4245: result: yes configure:4208: checking for string.h configure:4225: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4228: $? = 0 configure:4231: test -s conftest.o configure:4234: $? = 0 configure:4245: result: yes configure:4208: checking for memory.h configure:4225: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4228: $? = 0 configure:4231: test -s conftest.o configure:4234: $? = 0 configure:4245: result: yes configure:4208: checking for strings.h configure:4225: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4228: $? = 0 configure:4231: test -s conftest.o configure:4234: $? = 0 configure:4245: result: yes configure:4208: checking for inttypes.h configure:4225: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4228: $? = 0 configure:4231: test -s conftest.o configure:4234: $? = 0 configure:4245: result: yes configure:4208: checking for stdint.h configure:4225: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4228: $? = 0 configure:4231: test -s conftest.o configure:4234: $? = 0 configure:4245: result: yes configure:4208: checking for unistd.h configure:4225: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4228: $? = 0 configure:4231: test -s conftest.o configure:4234: $? = 0 configure:4245: result: yes configure:4271: checking dlfcn.h usability configure:4284: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:4287: $? = 0 configure:4290: test -s conftest.o configure:4293: $? = 0 configure:4303: result: yes configure:4307: checking dlfcn.h presence configure:4318: gcc -E conftest.c configure:4324: $? = 0 configure:4343: result: yes configure:4379: checking for dlfcn.h configure:4386: result: yes configure:4584: checking for ranlib configure:4600: found /usr/bin/ranlib configure:4611: result: ranlib configure:4664: checking for strip configure:4680: found /usr/bin/strip configure:4691: result: strip configure:4901: checking for objdir configure:4912: result: .libs configure:4929: checking for gcc option to produce PIC configure:5088: result: -fPIC configure:5092: checking if gcc PIC flag -fPIC works configure:5116: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 -fPIC -DPIC conftest.c >&5 configure:5119: $? = 0 configure:5122: test -s conftest.o configure:5125: $? = 0 configure:5163: result: yes configure:5179: checking if gcc static flag -static works configure:5204: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 -static conftest.c >&5 configure:5207: $? = 0 configure:5210: test -s conftest configure:5213: $? = 0 configure:5229: result: yes configure:5241: checking if gcc supports -c -o file.o configure:5261: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 -o out/conftest2.o conftest.c >&5 configure:5285: result: yes configure:5290: checking if gcc supports -c -o file.lo configure:5318: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 -c -o conftest.lo conftest.c >&5 configure:5321: $? = 0 configure:5324: test -s conftest.lo configure:5327: $? = 0 configure:5349: result: yes configure:5380: checking if gcc supports -fno-rtti -fno-exceptions configure:5403: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 -fno-rtti -fno-exceptions -c conftest.c conftest.c >&5 cc1: warning: "-fno-rtti" is valid for C++ but not for C/ObjC cc1: warning: "-fno-rtti" is valid for C++ but not for C/ObjC configure:5406: $? = 0 configure:5409: test -s conftest.o configure:5412: $? = 0 configure:5429: result: yes configure:5440: checking whether the linker (/usr/sparc-bobware-linux/bin/ld) supports shared libraries configure:6135: result: yes configure:6140: checking how to hardcode library paths into programs configure:6164: result: immediate configure:6169: checking whether stripping libraries is possible configure:6174: result: yes configure:6185: checking dynamic linker characteristics configure:6604: result: GNU/Linux ld.so configure:6609: checking if libtool supports shared libraries configure:6611: result: yes configure:6614: checking whether to build shared libraries configure:6635: result: yes configure:6638: checking whether to build static libraries configure:6642: result: yes configure:7316: checking whether -lc should be explicitly linked in configure:7324: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:7327: $? = 0 configure:7341: gcc -shared conftest.o -v -Wl,-soname -Wl,conftest -o conftest 2\>\&1 \| grep -lc \>/dev/null 2\>\&1 configure:7344: $? = 0 configure:7359: result: no configure:7952: checking sys/signal.h usability configure:7965: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:7968: $? = 0 configure:7971: test -s conftest.o configure:7974: $? = 0 configure:7984: result: yes configure:7988: checking sys/signal.h presence configure:7999: gcc -E conftest.c configure:8005: $? = 0 configure:8024: result: yes configure:8060: checking for sys/signal.h configure:8067: result: yes configure:8108: checking for unistd.h configure:8113: result: yes configure:8247: checking for getpagesize configure:8275: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:8278: $? = 0 configure:8281: test -s conftest configure:8284: $? = 0 configure:8295: result: yes configure:8306: checking for sysconf(_SC_PAGESIZE) configure:8334: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:8337: $? = 0 configure:8340: test -s conftest configure:8343: $? = 0 configure:8354: result: yes configure:8365: checking for PAGESIZE in limits.h configure:8388: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure: In function `main': configure:8401: error: `PAGESIZE' undeclared (first use in this function) configure:8401: error: (Each undeclared identifier is reported only once configure:8401: error: for each function it appears in.) configure:8391: $? = 1 configure: failed program was: | #line 8371 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | /* end confdefs.h. */ | #include | int | main () | { | int pgsz = PAGESIZE; | ; | return 0; | } configure:8408: result: no configure:8428: checking for mmap with MAP_ANON configure:8500: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:8503: $? = 0 configure:8505: ./conftest configure:8508: $? = 0 configure:8523: result: yes configure:8534: checking for mmap with MAP_ANONYMOUS configure:8606: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:8609: $? = 0 configure:8611: ./conftest configure:8614: $? = 0 configure:8629: result: yes configure:8640: checking for mmap of /dev/zero configure:8723: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:8726: $? = 0 configure:8728: ./conftest configure:8731: $? = 0 configure:8746: result: yes configure:8763: checking whether a fault handler according to POSIX works configure:8914: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:8917: $? = 0 configure:8919: ./conftest configure:8922: $? = 0 configure:8937: result: yes configure:8945: checking whether a fault handler according to Linux/i386 works configure:9097: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 In file included from configure:9038: /usr/include/asm/sigcontext.h:14: error: redefinition of `struct sigcontext' configure: In function `sigsegv_handler': configure:9064: error: structure has no member named `cr2' configure:9100: $? = 1 configure: program exited with status 1 configure: failed program was: | #line 9003 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | #include | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, struct sigcontext sc) | { | void *fault_address = (void *) (sc.cr2); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:9120: result: no configure:9128: checking whether a fault handler according to old Linux/i386 works configure:9280: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:9283: $? = 0 configure:9285: ./conftest configure:9288: $? = 3 configure: program exited with status 3 configure: failed program was: | #line 9186 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, unsigned int more) | { | void *fault_address = (void *) (((unsigned long *) &more) [21]); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:9303: result: no configure:9311: checking whether a fault handler according to Linux/m68k works configure:9465: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 In file included from configure:9405: /usr/include/asm/sigcontext.h:14: error: redefinition of `struct sigcontext' In file included from configure:9406: src/fault-linux-m68k.c: In function `get_fault_addr': src/fault-linux-m68k.c:22: error: structure has no member named `sc_formatvec' configure:9468: $? = 1 configure: program exited with status 1 configure: failed program was: | #line 9370 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | #include | #include "./src/fault-linux-m68k.c" | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, int code, struct sigcontext *scp) | { | void *fault_address = (void *) (get_fault_addr (scp)); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:9488: result: no configure:9496: checking whether a fault handler according to Linux/PowerPC works configure:9648: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 In file included from configure:9589: /usr/include/asm/sigcontext.h:14: error: redefinition of `struct sigcontext' configure: In function `sigsegv_handler': configure:9615: error: structure has no member named `regs' configure:9651: $? = 1 configure: program exited with status 1 configure: failed program was: | #line 9554 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | #include | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, struct sigcontext *scp) | { | void *fault_address = (void *) (scp->regs->dar); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:9671: result: no configure:9679: checking whether a fault handler according to Linux/HPPA works configure:9830: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:9833: $? = 0 configure:9835: ./conftest configure:9838: $? = 3 configure: program exited with status 3 configure: failed program was: | #line 9738 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, siginfo_t *sip, void *ucp) | { | void *fault_address = (void *) (sip->si_ptr); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | action.sa_sigaction = &sigsegv_handler; | action.sa_flags = SA_SIGINFO; | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:9853: result: no configure:9861: checking whether a fault handler according to BSD works configure:10013: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:10016: $? = 0 configure:10018: ./conftest configure:10021: $? = 3 configure: program exited with status 3 configure: failed program was: | #line 9919 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, int code, struct sigcontext *scp, void *addr) | { | void *fault_address = (void *) (addr); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:10036: result: no configure:10044: checking whether a fault handler according to IRIX works configure:10196: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure: In function `sigsegv_handler': configure:10163: error: structure has no member named `sc_badvaddr' configure:10199: $? = 1 configure: program exited with status 1 configure: failed program was: | #line 10102 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, int code, struct sigcontext *scp) | { | void *fault_address = (void *) ((unsigned long) scp->sc_badvaddr); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:10219: result: no configure:10227: checking whether a fault handler according to HP-UX HPPA works configure:10389: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure: In function `sigsegv_handler': configure:10354: error: structure has no member named `sc_sl' configure:10354: error: `SS_WIDEREGS' undeclared (first use in this function) configure:10354: error: (Each undeclared identifier is reported only once configure:10354: error: for each function it appears in.) configure:10354: error: structure has no member named `sc_sl' configure:10354: error: `SS_NARROWISINVALID' undeclared (first use in this function) configure:10354: error: structure has no member named `sc_sl' configure:10354: error: structure has no member named `sc_sl' configure:10392: $? = 1 configure: program exited with status 1 configure: failed program was: | #line 10290 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | | #define USE_64BIT_REGS(mc) (((mc).ss_flags & SS_WIDEREGS) && ((mc).ss_flags & SS_NARROWISINVALID)) | #define GET_CR21(mc) (USE_64BIT_REGS(mc) ? (mc).ss_wide.ss_64.ss_cr21 : (mc).ss_narrow.ss_cr21) | | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, int code, struct sigcontext *scp) | { | void *fault_address = (void *) (GET_CR21 (scp->sc_sl.sl_ss)); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:10412: result: no configure:10420: checking whether a fault handler according to OSF/1 Alpha works configure:10572: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure: In function `sigsegv_handler': configure:10539: error: structure has no member named `sc_traparg_a0' configure:10575: $? = 1 configure: program exited with status 1 configure: failed program was: | #line 10478 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, int code, struct sigcontext *scp) | { | void *fault_address = (void *) (scp->sc_traparg_a0); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:10595: result: no configure:10603: checking whether a fault handler according to NetBSD Alpha works configure:10755: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 In file included from configure:10696: src/fault-netbsd-alpha.c: In function `get_fault_addr': src/fault-netbsd-alpha.c:25: error: structure has no member named `sc_pc' src/fault-netbsd-alpha.c:36: error: structure has no member named `sc_regs' configure:10758: $? = 1 configure: program exited with status 1 configure: failed program was: | #line 10661 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | #include "./src/fault-netbsd-alpha.c" | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, int code, struct sigcontext *scp) | { | void *fault_address = (void *) (get_fault_addr (scp)); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:10778: result: no configure:10786: checking whether a fault handler according to AIX works configure:10938: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure: In function `sigsegv_handler': configure:10905: error: structure has no member named `sc_jmpbuf' configure:10941: $? = 1 configure: program exited with status 1 configure: failed program was: | #line 10844 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, int code, struct sigcontext *scp) | { | void *fault_address = (void *) (scp->sc_jmpbuf.jmp_context.o_vaddr); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:10961: result: no configure:10969: checking whether a fault handler according to MacOSX PowerPC works configure:11121: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 In file included from configure:11062: src/fault-macos-powerpc.c: In function `get_fault_addr': src/fault-macos-powerpc.c:36: error: structure has no member named `sc_ir' src/fault-macos-powerpc.c:37: error: structure has no member named `sc_regs' configure:11124: $? = 1 configure: program exited with status 1 configure: failed program was: | #line 11027 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | #include "./src/fault-macos-powerpc.c" | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, int code, struct sigcontext *scp) | { | void *fault_address = (void *) (get_fault_addr (scp)); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:11144: result: no configure:11152: checking whether a fault handler according to Hurd works configure:11304: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:11307: $? = 0 configure:11309: ./conftest configure:11312: $? = 3 configure: program exited with status 3 configure: failed program was: | #line 11210 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | | #include | #include | #if HAVE_MMAP_DEVZERO | # include | # ifndef MAP_FILE | # define MAP_FILE 0 | # endif | #endif | #ifndef PROT_NONE | # define PROT_NONE 0 | #endif | #if HAVE_MMAP_ANON | # define zero_fd -1 | # define map_flags MAP_ANON | MAP_PRIVATE | #elif HAVE_MMAP_ANONYMOUS | # define zero_fd -1 | # define map_flags MAP_ANONYMOUS | MAP_PRIVATE | #elif HAVE_MMAP_DEVZERO | static int zero_fd; | # define map_flags MAP_FILE | MAP_PRIVATE | #endif | unsigned long page; | int handler_called = 0; | void sigsegv_handler (int sig, int code, struct sigcontext *scp) | { | void *fault_address = (void *) (code); | handler_called++; | if (handler_called == 10) | exit (4); | if (fault_address != (void*)(page + 0x678)) | exit (3); | if (mprotect ((void *) page, 0x10000, PROT_READ | PROT_WRITE) < 0) | exit (2); | } | void crasher (unsigned long p) | { | *(int *) (p + 0x678) = 42; | } | int main () | { | void *p; | struct sigaction action; | /* Preparations. */ | #if !HAVE_MMAP_ANON && !HAVE_MMAP_ANONYMOUS && HAVE_MMAP_DEVZERO | zero_fd = open ("/dev/zero", O_RDONLY, 0644); | #endif | /* Setup some mmaped memory. */ | #ifdef __hpux | /* HP-UX 10 mmap() often fails when given a hint. So give the OS complete | freedom about the address range. */ | p = mmap ((void *) 0, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #else | p = mmap ((void *) 0x12340000, 0x10000, PROT_READ | PROT_WRITE, map_flags, zero_fd, 0); | #endif | if (p == (void *)(-1)) | exit (2); | page = (unsigned long) p; | /* Make it read-only. */ | if (mprotect ((void *) page, 0x10000, PROT_READ) < 0) | exit (2); | /* Install the SIGSEGV handler. */ | sigemptyset(&action.sa_mask); | | action.sa_handler = (void (*) (int)) &sigsegv_handler; | action.sa_flags = 0; | | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* The first write access should invoke the handler and then complete. */ | crasher (page); | /* The second write access should not invoke the handler. */ | crasher (page); | /* Check that the handler was called only once. */ | if (handler_called != 1) | exit (1); | /* Test passed! */ | return 0; | } configure:11327: result: no configure:11537: checking for the fault handler specifics configure:11544: result: fault-posix.h configure:11557: checking if the system supports catching SIGSEGV configure:11559: result: yes configure:11569: checking for stack direction configure:11666: result: grows down configure:11674: checking for PIOCMAP in sys/procfs.h configure:11697: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure: In function `main': configure:11715: error: `PIOCNMAP' undeclared (first use in this function) configure:11715: error: (Each undeclared identifier is reported only once configure:11715: error: for each function it appears in.) configure:11715: error: `PIOCMAP' undeclared (first use in this function) configure:11715: error: `prmap_t' undeclared (first use in this function) configure:11715: error: syntax error before "y" configure:11700: $? = 1 configure: failed program was: | #line 11680 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | #define CFG_FAULT "fault-posix.h" | #define STACK_DIRECTION -1 | /* end confdefs.h. */ | #include | int | main () | { | int x = PIOCNMAP + PIOCMAP; prmap_t y; | ; | return 0; | } configure:11718: result: no configure:11752: checking for getrlimit configure:11802: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:11805: $? = 0 configure:11808: test -s conftest configure:11811: $? = 0 configure:11822: result: yes configure:11752: checking for setrlimit configure:11802: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:11805: $? = 0 configure:11808: test -s conftest configure:11811: $? = 0 configure:11822: result: yes configure:11841: checking for sigaltstack configure:11891: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:11894: $? = 0 configure:11897: test -s conftest configure:11900: $? = 0 configure:11911: result: yes configure:11923: checking for stack_t configure:11954: gcc -c -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:11957: $? = 0 configure:11960: test -s conftest.o configure:11963: $? = 0 configure:11974: result: yes configure:11989: checking for working sigaltstack configure:12101: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:12104: $? = 0 configure:12106: ./conftest ./configure: line 12107: 22029 Illegal instruction ./conftest$ac_exeext configure:12109: $? = 132 configure: program exited with status 132 configure: failed program was: | #line 12040 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | #define CFG_FAULT "fault-posix.h" | #define STACK_DIRECTION -1 | #define HAVE_STACKVMA 1 | #define CFG_STACKVMA "stackvma-linux.c" | #define HAVE_GETRLIMIT 1 | #define HAVE_SETRLIMIT 1 | #define HAVE_SIGALTSTACK 1 | /* end confdefs.h. */ | | #include | #include | #if HAVE_SYS_SIGNAL_H | # include | #endif | #if HAVE_SETRLIMIT | # include | # include | # include | #endif | void stackoverflow_handler (int sig) | { | /* If we get here, the stack overflow was caught. */ | exit (0); | } | int recurse (int n) | { | if (n >= 0) | return n + recurse (n + 1); | else | return 0; | } | int main () | { | char mystack[16384]; | stack_t altstack; | struct sigaction action; | #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK | /* Before starting the endless recursion, try to be friendly to the user's | machine. On some Linux 2.2.x systems, there is no stack limit for user | processes at all. We don't want to kill such systems. */ | struct rlimit rl; | rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ | setrlimit (RLIMIT_STACK, &rl); | #endif | /* Install the alternate stack. */ | altstack.ss_sp = mystack; | altstack.ss_size = sizeof (mystack); | altstack.ss_flags = 0; /* no SS_DISABLE */ | if (sigaltstack (&altstack, NULL) < 0) | exit (1); | /* Install the SIGSEGV handler. */ | sigemptyset (&action.sa_mask); | action.sa_handler = &stackoverflow_handler; | action.sa_flags = SA_ONSTACK; | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* Provoke a stack overflow. */ | recurse (0); | exit (2); | } configure:12127: result: no configure:12138: checking if the system supports catching stack overflow configure:12223: result: no configure:12239: checking whether a signal handler can be left through longjmp configure:12325: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:12328: $? = 0 configure:12330: ./conftest ./configure: line 12331: 22052 Illegal instruction ./conftest$ac_exeext configure:12333: $? = 132 configure: program exited with status 132 configure: failed program was: | #line 12252 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | #define CFG_FAULT "fault-posix.h" | #define STACK_DIRECTION -1 | #define HAVE_STACKVMA 1 | #define CFG_STACKVMA "stackvma-linux.c" | #define HAVE_GETRLIMIT 1 | #define HAVE_SETRLIMIT 1 | #define HAVE_SIGALTSTACK 1 | /* end confdefs.h. */ | | #include | #include | #include | | #if HAVE_SETRLIMIT | # include | # include | # include | #endif | jmp_buf mainloop; | sigset_t mainsigset; | int pass = 0; | void stackoverflow_handler (int sig) | { | pass++; | sigprocmask (SIG_SETMASK, &mainsigset, NULL); | { } | longjmp (mainloop, pass); | } | int recurse (int n) | { | if (n >= 0) | return n + recurse (n + 1); | else | return 0; | } | int main () | { | char mystack[16384]; | stack_t altstack; | struct sigaction action; | sigset_t emptyset; | #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK | /* Before starting the endless recursion, try to be friendly to the user's | machine. On some Linux 2.2.x systems, there is no stack limit for user | processes at all. We don't want to kill such systems. */ | struct rlimit rl; | rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ | setrlimit (RLIMIT_STACK, &rl); | #endif | /* Install the alternate stack. */ | altstack.ss_sp = mystack; | altstack.ss_size = sizeof (mystack); | altstack.ss_flags = 0; /* no SS_DISABLE */ | if (sigaltstack (&altstack, NULL) < 0) | exit (1); | /* Install the SIGSEGV handler. */ | sigemptyset (&action.sa_mask); | action.sa_handler = &stackoverflow_handler; | action.sa_flags = SA_ONSTACK; | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* Save the current signal mask. */ | sigemptyset (&emptyset); | sigprocmask (SIG_BLOCK, &emptyset, &mainsigset); | /* Provoke two stack overflows in a row. */ | if (setjmp (mainloop) < 2) | { | recurse (0); | exit (2); | } | exit (0); | } configure:12348: result: no configure:12356: checking whether a signal handler can be left through longjmp and sigaltstack configure:12452: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:12455: $? = 0 configure:12457: ./conftest ./configure: line 12458: 22071 Illegal instruction ./conftest$ac_exeext configure:12460: $? = 132 configure: program exited with status 132 configure: failed program was: | #line 12369 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | #define CFG_FAULT "fault-posix.h" | #define STACK_DIRECTION -1 | #define HAVE_STACKVMA 1 | #define CFG_STACKVMA "stackvma-linux.c" | #define HAVE_GETRLIMIT 1 | #define HAVE_SETRLIMIT 1 | #define HAVE_SIGALTSTACK 1 | /* end confdefs.h. */ | | #include | #include | #include | | #ifndef SS_ONSTACK | #define SS_ONSTACK SA_ONSTACK | #endif | | #if HAVE_SETRLIMIT | # include | # include | # include | #endif | jmp_buf mainloop; | sigset_t mainsigset; | int pass = 0; | void stackoverflow_handler (int sig) | { | pass++; | sigprocmask (SIG_SETMASK, &mainsigset, NULL); | { stack_t ss; | if (sigaltstack (NULL, &ss) >= 0) | { | ss.ss_flags &= ~SS_ONSTACK; | sigaltstack (&ss, NULL); | } | } | longjmp (mainloop, pass); | } | int recurse (int n) | { | if (n >= 0) | return n + recurse (n + 1); | else | return 0; | } | int main () | { | char mystack[16384]; | stack_t altstack; | struct sigaction action; | sigset_t emptyset; | #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK | /* Before starting the endless recursion, try to be friendly to the user's | machine. On some Linux 2.2.x systems, there is no stack limit for user | processes at all. We don't want to kill such systems. */ | struct rlimit rl; | rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ | setrlimit (RLIMIT_STACK, &rl); | #endif | /* Install the alternate stack. */ | altstack.ss_sp = mystack; | altstack.ss_size = sizeof (mystack); | altstack.ss_flags = 0; /* no SS_DISABLE */ | if (sigaltstack (&altstack, NULL) < 0) | exit (1); | /* Install the SIGSEGV handler. */ | sigemptyset (&action.sa_mask); | action.sa_handler = &stackoverflow_handler; | action.sa_flags = SA_ONSTACK; | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* Save the current signal mask. */ | sigemptyset (&emptyset); | sigprocmask (SIG_BLOCK, &emptyset, &mainsigset); | /* Provoke two stack overflows in a row. */ | if (setjmp (mainloop) < 2) | { | recurse (0); | exit (2); | } | exit (0); | } configure:12475: result: no configure:12483: checking whether a signal handler can be left through longjmp and setcontext configure:12584: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 /tmp/cc4zwZJF.o(.text+0x34): In function `stackoverflow_handler': : warning: warning: getcontext is not implemented and will always fail /tmp/cc4zwZJF.o(.text+0x80): In function `stackoverflow_handler': : warning: warning: setcontext is not implemented and will always fail configure:12587: $? = 0 configure:12589: ./conftest ./configure: line 12590: 22091 Illegal instruction ./conftest$ac_exeext configure:12592: $? = 132 configure: program exited with status 132 configure: failed program was: | #line 12496 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | #define CFG_FAULT "fault-posix.h" | #define STACK_DIRECTION -1 | #define HAVE_STACKVMA 1 | #define CFG_STACKVMA "stackvma-linux.c" | #define HAVE_GETRLIMIT 1 | #define HAVE_SETRLIMIT 1 | #define HAVE_SIGALTSTACK 1 | /* end confdefs.h. */ | | #include | #include | #include | #include | #ifndef SS_ONSTACK | #define SS_ONSTACK SA_ONSTACK | #endif | | #if HAVE_SETRLIMIT | # include | # include | # include | #endif | jmp_buf mainloop; | sigset_t mainsigset; | int pass = 0; | void stackoverflow_handler (int sig) | { | pass++; | sigprocmask (SIG_SETMASK, &mainsigset, NULL); | { static int fl; | static ucontext_t uc; | fl = 0; | if (getcontext (&uc) >= 0) | if (fl == 0) | if (uc.uc_stack.ss_flags & SS_ONSTACK) | { | uc.uc_stack.ss_flags &= ~SS_ONSTACK; | fl = 1; | setcontext (&uc); | } | } | longjmp (mainloop, pass); | } | int recurse (int n) | { | if (n >= 0) | return n + recurse (n + 1); | else | return 0; | } | int main () | { | char mystack[16384]; | stack_t altstack; | struct sigaction action; | sigset_t emptyset; | #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK | /* Before starting the endless recursion, try to be friendly to the user's | machine. On some Linux 2.2.x systems, there is no stack limit for user | processes at all. We don't want to kill such systems. */ | struct rlimit rl; | rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ | setrlimit (RLIMIT_STACK, &rl); | #endif | /* Install the alternate stack. */ | altstack.ss_sp = mystack; | altstack.ss_size = sizeof (mystack); | altstack.ss_flags = 0; /* no SS_DISABLE */ | if (sigaltstack (&altstack, NULL) < 0) | exit (1); | /* Install the SIGSEGV handler. */ | sigemptyset (&action.sa_mask); | action.sa_handler = &stackoverflow_handler; | action.sa_flags = SA_ONSTACK; | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* Save the current signal mask. */ | sigemptyset (&emptyset); | sigprocmask (SIG_BLOCK, &emptyset, &mainsigset); | /* Provoke two stack overflows in a row. */ | if (setjmp (mainloop) < 2) | { | recurse (0); | exit (2); | } | exit (0); | } configure:12607: result: no configure:12618: checking whether a signal handler can be left through siglongjmp configure:12702: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:12705: $? = 0 configure:12707: ./conftest ./configure: line 12708: 22113 Illegal instruction ./conftest$ac_exeext configure:12710: $? = 132 configure: program exited with status 132 configure: failed program was: | #line 12631 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | #define CFG_FAULT "fault-posix.h" | #define STACK_DIRECTION -1 | #define HAVE_STACKVMA 1 | #define CFG_STACKVMA "stackvma-linux.c" | #define HAVE_GETRLIMIT 1 | #define HAVE_SETRLIMIT 1 | #define HAVE_SIGALTSTACK 1 | /* end confdefs.h. */ | | #include | #include | #include | | #if HAVE_SETRLIMIT | # include | # include | # include | #endif | sigjmp_buf mainloop; | int pass = 0; | void stackoverflow_handler (int sig) | { | pass++; | { } | siglongjmp (mainloop, pass); | } | int recurse (int n) | { | if (n >= 0) | return n + recurse (n + 1); | else | return 0; | } | int main () | { | char mystack[16384]; | stack_t altstack; | struct sigaction action; | #ifdef __BEOS__ | /* On BeOS, this would hang, burning CPU time. Better fail than hang. */ | exit (1); | #endif | #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK | /* Before starting the endless recursion, try to be friendly to the user's | machine. On some Linux 2.2.x systems, there is no stack limit for user | processes at all. We don't want to kill such systems. */ | struct rlimit rl; | rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ | setrlimit (RLIMIT_STACK, &rl); | #endif | /* Install the alternate stack. */ | altstack.ss_sp = mystack; | altstack.ss_size = sizeof (mystack); | altstack.ss_flags = 0; /* no SS_DISABLE */ | if (sigaltstack (&altstack, NULL) < 0) | exit (1); | /* Install the SIGSEGV handler. */ | sigemptyset (&action.sa_mask); | action.sa_handler = &stackoverflow_handler; | action.sa_flags = SA_ONSTACK; | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* Provoke two stack overflows in a row. */ | if (sigsetjmp (mainloop, 1) < 2) | { | recurse (0); | exit (2); | } | exit (0); | } configure:12725: result: no configure:12733: checking whether a signal handler can be left through siglongjmp and sigaltstack configure:12827: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 configure:12830: $? = 0 configure:12832: ./conftest ./configure: line 12833: 22132 Illegal instruction ./conftest$ac_exeext configure:12835: $? = 132 configure: program exited with status 132 configure: failed program was: | #line 12746 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | #define CFG_FAULT "fault-posix.h" | #define STACK_DIRECTION -1 | #define HAVE_STACKVMA 1 | #define CFG_STACKVMA "stackvma-linux.c" | #define HAVE_GETRLIMIT 1 | #define HAVE_SETRLIMIT 1 | #define HAVE_SIGALTSTACK 1 | /* end confdefs.h. */ | | #include | #include | #include | | #ifndef SS_ONSTACK | #define SS_ONSTACK SA_ONSTACK | #endif | | #if HAVE_SETRLIMIT | # include | # include | # include | #endif | sigjmp_buf mainloop; | int pass = 0; | void stackoverflow_handler (int sig) | { | pass++; | { stack_t ss; | if (sigaltstack (NULL, &ss) >= 0) | { | ss.ss_flags &= ~SS_ONSTACK; | sigaltstack (&ss, NULL); | } | } | siglongjmp (mainloop, pass); | } | int recurse (int n) | { | if (n >= 0) | return n + recurse (n + 1); | else | return 0; | } | int main () | { | char mystack[16384]; | stack_t altstack; | struct sigaction action; | #ifdef __BEOS__ | /* On BeOS, this would hang, burning CPU time. Better fail than hang. */ | exit (1); | #endif | #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK | /* Before starting the endless recursion, try to be friendly to the user's | machine. On some Linux 2.2.x systems, there is no stack limit for user | processes at all. We don't want to kill such systems. */ | struct rlimit rl; | rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ | setrlimit (RLIMIT_STACK, &rl); | #endif | /* Install the alternate stack. */ | altstack.ss_sp = mystack; | altstack.ss_size = sizeof (mystack); | altstack.ss_flags = 0; /* no SS_DISABLE */ | if (sigaltstack (&altstack, NULL) < 0) | exit (1); | /* Install the SIGSEGV handler. */ | sigemptyset (&action.sa_mask); | action.sa_handler = &stackoverflow_handler; | action.sa_flags = SA_ONSTACK; | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* Provoke two stack overflows in a row. */ | if (sigsetjmp (mainloop, 1) < 2) | { | recurse (0); | exit (2); | } | exit (0); | } configure:12850: result: no configure:12858: checking whether a signal handler can be left through siglongjmp and setcontext configure:12957: gcc -o conftest -O2 -m32 -mcpu=v8 -mtune=v9 conftest.c >&5 /tmp/ccShzeuf.o(.text+0x20): In function `stackoverflow_handler': : warning: warning: getcontext is not implemented and will always fail /tmp/ccShzeuf.o(.text+0x6c): In function `stackoverflow_handler': : warning: warning: setcontext is not implemented and will always fail configure:12960: $? = 0 configure:12962: ./conftest ./configure: line 12963: 22155 Illegal instruction ./conftest$ac_exeext configure:12965: $? = 132 configure: program exited with status 132 configure: failed program was: | #line 12871 "configure" | /* confdefs.h. */ | | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE "libsigsegv" | #define VERSION "2.1" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define HAVE_SYS_SIGNAL_H 1 | #define CFG_SIGNALS "signals.h" | #define HAVE_UNISTD_H 1 | #define HAVE_GETPAGESIZE 1 | #define HAVE_SYSCONF_PAGESIZE 1 | #define HAVE_MMAP_ANON 1 | #define HAVE_MMAP_ANONYMOUS 1 | #define HAVE_MMAP_DEVZERO 1 | #define CFG_FAULT "fault-posix.h" | #define STACK_DIRECTION -1 | #define HAVE_STACKVMA 1 | #define CFG_STACKVMA "stackvma-linux.c" | #define HAVE_GETRLIMIT 1 | #define HAVE_SETRLIMIT 1 | #define HAVE_SIGALTSTACK 1 | /* end confdefs.h. */ | | #include | #include | #include | #include | #ifndef SS_ONSTACK | #define SS_ONSTACK SA_ONSTACK | #endif | | #if HAVE_SETRLIMIT | # include | # include | # include | #endif | sigjmp_buf mainloop; | int pass = 0; | void stackoverflow_handler (int sig) | { | pass++; | { static int fl; | static ucontext_t uc; | fl = 0; | if (getcontext(&uc) >= 0) | if (fl == 0) | if (uc.uc_stack.ss_flags & SS_ONSTACK) | { | uc.uc_stack.ss_flags &= ~SS_ONSTACK; | fl = 1; | setcontext(&uc); | } | } | siglongjmp (mainloop, pass); | } | int recurse (int n) | { | if (n >= 0) | return n + recurse (n + 1); | else | return 0; | } | int main () | { | char mystack[16384]; | stack_t altstack; | struct sigaction action; | #ifdef __BEOS__ | /* On BeOS, this would hang, burning CPU time. Better fail than hang. */ | exit (1); | #endif | #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK | /* Before starting the endless recursion, try to be friendly to the user's | machine. On some Linux 2.2.x systems, there is no stack limit for user | processes at all. We don't want to kill such systems. */ | struct rlimit rl; | rl.rlim_cur = rl.rlim_max = 0x100000; /* 1 MB */ | setrlimit (RLIMIT_STACK, &rl); | #endif | /* Install the alternate stack. */ | altstack.ss_sp = mystack; | altstack.ss_size = sizeof (mystack); | altstack.ss_flags = 0; /* no SS_DISABLE */ | if (sigaltstack (&altstack, NULL) < 0) | exit (1); | /* Install the SIGSEGV handler. */ | sigemptyset (&action.sa_mask); | action.sa_handler = &stackoverflow_handler; | action.sa_flags = SA_ONSTACK; | sigaction (SIGSEGV, &action, (struct sigaction *) NULL); | sigaction (SIGBUS, &action, (struct sigaction *) NULL); | /* Provoke two stack overflows in a row. */ | if (sigsetjmp (mainloop, 1) < 2) | { | recurse (0); | exit (2); | } | exit (0); | } configure:12980: result: no configure:13033: checking whether to activate relocatable installation configure:13048: result: no configure:13164: creating ./config.status ## ---------------------- ## ## Running config.status. ## ## ---------------------- ## This file was extended by config.status, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = CONFIG_HEADERS = CONFIG_LINKS = CONFIG_COMMANDS = $ ./config.status on weirdgear config.status:678: creating Makefile config.status:678: creating src/Makefile config.status:678: creating src/sigsegv.h config.status:678: creating m4/Makefile config.status:678: creating tests/Makefile config.status:782: creating config.h config.status:1045: executing depfiles commands ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=sparc-unknown-linux-gnu ac_cv_build_alias=sparc-unknown-linux-gnu ac_cv_c_compiler_gnu=yes ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set=set ac_cv_env_CFLAGS_value='-O2 -m32 -mcpu=v8 -mtune=v9' ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_LDFLAGS_set= ac_cv_env_LDFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_exeext= ac_cv_func_getrlimit=yes ac_cv_func_setrlimit=yes ac_cv_func_sigaltstack=yes ac_cv_header_dlfcn_h=yes ac_cv_header_inttypes_h=yes ac_cv_header_memory_h=yes ac_cv_header_stdc=yes ac_cv_header_stdint_h=yes ac_cv_header_stdlib_h=yes ac_cv_header_string_h=yes ac_cv_header_strings_h=yes ac_cv_header_sys_signal_h=yes ac_cv_header_sys_stat_h=yes ac_cv_header_sys_types_h=yes ac_cv_header_unistd_h=yes ac_cv_host=sparc-unknown-linux-gnu ac_cv_host_alias=sparc-unknown-linux-gnu ac_cv_objext=o ac_cv_path_install='/usr/bin/ginstall -c' ac_cv_prog_AWK=gawk ac_cv_prog_CPP='gcc -E' ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_ac_ct_RANLIB=ranlib ac_cv_prog_ac_ct_STRIP=strip ac_cv_prog_cc_g=yes ac_cv_prog_cc_stdc= ac_cv_prog_egrep='grep -E' ac_cv_prog_make_make_set=yes ac_cv_type_stack_t=yes am_cv_CC_dependencies_compiler_type=none lt_cv_archive_cmds_need_lc=no lt_cv_compiler_c_o=yes lt_cv_compiler_o_lo=yes lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file='/lib/libc.so.6 /lib/libc-2.2.3.so /lib/libc-2.3.2.so /lib/libc-2.3.5.so' lt_cv_global_symbol_to_c_name_address='sed -n -e '\''s/^: \([^ ]*\) $/ {\"\1\", (lt_ptr) 0},/p'\'' -e '\''s/^[BCDEGRST] \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr) \&\2},/p'\''' lt_cv_global_symbol_to_cdecl='sed -n -e '\''s/^. .* \(.*\)$/extern char \1;/p'\''' lt_cv_ld_reload_flag=-r lt_cv_path_LD=/usr/sparc-bobware-linux/bin/ld lt_cv_path_NM='/usr/bin/nm -B' lt_cv_path_SED=/usr/bin/sed lt_cv_prog_cc_can_build_shared=yes lt_cv_prog_cc_no_builtin= lt_cv_prog_cc_pic=' -fPIC' lt_cv_prog_cc_pic_works=yes lt_cv_prog_cc_shlib= lt_cv_prog_cc_static=-static lt_cv_prog_cc_static_works=yes lt_cv_prog_cc_wl=-Wl, lt_cv_prog_gnu_ld=yes lt_cv_sys_global_symbol_pipe='sed -n -e '\''s/^.*[ ]\([ABCDGISTW][ABCDGISTW]*\)[ ][ ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p'\''' sv_cv_fault_aix=no sv_cv_fault_bsd=no sv_cv_fault_hpux_hppa=no sv_cv_fault_hurd=no sv_cv_fault_include=fault-posix.h sv_cv_fault_irix=no sv_cv_fault_linux_hppa=no sv_cv_fault_linux_i386=no sv_cv_fault_linux_i386_old=no sv_cv_fault_linux_m68k=no sv_cv_fault_linux_powerpc=no sv_cv_fault_macos_ppc=no sv_cv_fault_netbsd_alpha=no sv_cv_fault_osf_alpha=no sv_cv_fault_posix=yes sv_cv_func_getpagesize=yes sv_cv_func_mmap_anon=yes sv_cv_func_mmap_anonymous=yes sv_cv_func_mmap_devzero=yes sv_cv_func_sysconf_pagesize=yes sv_cv_have_sigsegv_recovery=yes sv_cv_have_stack_overflow_recovery=no sv_cv_host=sparc-unknown-linux2.4.32-gnu-glibc2.3 sv_cv_leave_handler_longjmp=no sv_cv_leave_handler_longjmp_setcontext=no sv_cv_leave_handler_longjmp_sigaltstack=no sv_cv_leave_handler_siglongjmp=no sv_cv_leave_handler_siglongjmp_setcontext=no sv_cv_leave_handler_siglongjmp_sigaltstack=no sv_cv_macro_pagesize=no sv_cv_procfsvma=no sv_cv_sigaltstack=no sv_cv_stack_direction=-1 sv_cv_stack_direction_msg='grows down' ## ----------------- ## ## Output variables. ## ## ----------------- ## ACLOCAL='${SHELL} /home/bobware-10.2/source/d/clisp/libsigsegv-2.1/autoconf/missing --run aclocal-1.7' AMDEPBACKSLASH='\' AMDEP_FALSE='#' AMDEP_TRUE='' AMTAR='${SHELL} /home/bobware-10.2/source/d/clisp/libsigsegv-2.1/autoconf/missing --run tar' AUTOCONF='${SHELL} /home/bobware-10.2/source/d/clisp/libsigsegv-2.1/autoconf/missing --run autoconf' AUTOHEADER='${SHELL} /home/bobware-10.2/source/d/clisp/libsigsegv-2.1/autoconf/missing --run autoheader' AUTOMAKE='${SHELL} /home/bobware-10.2/source/d/clisp/libsigsegv-2.1/autoconf/missing --run automake-1.7' AWK='gawk' CC='gcc' CCDEPMODE='depmode=none' CFG_HANDLER='handler-unix.c' CFG_LEAVE='leave-none.c' CFG_STACKVMA='stackvma-linux.c' CFLAGS='-O2 -m32 -mcpu=v8 -mtune=v9' CPP='gcc -E' CPPFLAGS='' CYGPATH_W='echo' DEFS='-DHAVE_CONFIG_H' DEPDIR='.deps' ECHO='echo' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='grep -E' EXEEXT='' FAULT_CONTEXT='ucontext_t' FAULT_CONTEXT_INCLUDE='#include ' HAVE_SIGSEGV_RECOVERY='1' HAVE_STACK_OVERFLOW_RECOVERY='0' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s' LDFLAGS='' LIBOBJS='' LIBS='' LIBTOOL='$(SHELL) $(top_builddir)/libtool' LN_S='ln -s' LTLIBOBJS='' MAKEINFO='${SHELL} /home/bobware-10.2/source/d/clisp/libsigsegv-2.1/autoconf/missing --run makeinfo' OBJEXT='o' PACKAGE='libsigsegv' PACKAGE_BUGREPORT='' PACKAGE_NAME='' PACKAGE_STRING='' PACKAGE_TARNAME='' PACKAGE_VERSION='' PATH_SEPARATOR=':' PLATFORM='sparc-unknown-linux2.4.32-gnu-glibc2.3' RANLIB='ranlib' RELOCATABLE='no' SET_MAKE='' SHELL='/bin/sh' STRIP='strip' VERSION='2.1' ac_ct_CC='gcc' ac_ct_RANLIB='ranlib' ac_ct_STRIP='strip' am__fastdepCC_FALSE='' am__fastdepCC_TRUE='#' am__include='include' am__leading_dot='.' am__quote='' bindir='${exec_prefix}/bin' build='sparc-unknown-linux-gnu' build_alias='' build_cpu='sparc' build_os='linux-gnu' build_vendor='unknown' datadir='${prefix}/share' exec_prefix='${prefix}' host='sparc-unknown-linux-gnu' host_alias='' host_cpu='sparc' host_os='linux-gnu' host_vendor='unknown' includedir='${prefix}/include' infodir='${prefix}/info' install_sh='/home/bobware-10.2/source/d/clisp/libsigsegv-2.1/autoconf/install-sh' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localstatedir='${prefix}/var' mandir='${prefix}/man' oldincludedir='/usr/include' prefix='/usr' program_transform_name='s,x,x,' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc' target_alias='' ## ----------- ## ## confdefs.h. ## ## ----------- ## #define CFG_FAULT "fault-posix.h" #define CFG_HANDLER "handler-unix.c" #define CFG_LEAVE "leave-none.c" #define CFG_SIGNALS "signals.h" #define CFG_STACKVMA "stackvma-linux.c" #define HAVE_DLFCN_H 1 #define HAVE_GETPAGESIZE 1 #define HAVE_GETRLIMIT 1 #define HAVE_INTTYPES_H 1 #define HAVE_MEMORY_H 1 #define HAVE_MMAP_ANON 1 #define HAVE_MMAP_ANONYMOUS 1 #define HAVE_MMAP_DEVZERO 1 #define HAVE_SETRLIMIT 1 #define HAVE_SIGALTSTACK 1 #define HAVE_STACKVMA 1 #define HAVE_STDINT_H 1 #define HAVE_STDLIB_H 1 #define HAVE_STRINGS_H 1 #define HAVE_STRING_H 1 #define HAVE_SYSCONF_PAGESIZE 1 #define HAVE_SYS_SIGNAL_H 1 #define HAVE_SYS_STAT_H 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_UNISTD_H 1 #define HAVE_UNISTD_H 1 #define PACKAGE "libsigsegv" #define PACKAGE_BUGREPORT "" #define PACKAGE_NAME "" #define PACKAGE_STRING "" #define PACKAGE_TARNAME "" #define PACKAGE_VERSION "" #define STACK_DIRECTION -1 #define STDC_HEADERS 1 #define VERSION "2.1" configure: exit 0