Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 201708 Details for
Bug 282017
sys-apps/gawk-3.1.7 doesn't use external libsigsegv, fails to build on IRIX
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Failing 'conftest.c' from configure
conftest.c (text/plain), 3.11 KB, created by
Stuart Shelton
on 2009-08-19 12:58:22 UTC
(
hide
)
Description:
Failing 'conftest.c' from configure
Filename:
MIME Type:
Creator:
Stuart Shelton
Created:
2009-08-19 12:58:22 UTC
Size:
3.11 KB
patch
obsolete
> > /* confdefs.h. */ >#define PACKAGE_NAME "" >#define PACKAGE_TARNAME "" >#define PACKAGE_VERSION "" >#define PACKAGE_STRING "" >#define PACKAGE_BUGREPORT "" >#define PACKAGE "libsigsegv" >#define VERSION "2.7-pre1" >#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 LT_OBJDIR ".libs/" >#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_DEVZERO 1 >#define CFG_FAULT "fault-irix-mips.h" >#define CFG_MACHFAULT "fault-none.h" >#define STACK_DIRECTION -1 >#define HAVE_STACKVMA 1 >#define CFG_STACKVMA "stackvma-procfs.c" >#define HAVE_GETRLIMIT 1 >#define HAVE_SETRLIMIT 1 >#define HAVE_SIGALTSTACK 1 >#define HAVE_WORKING_SIGALTSTACK 1 >#define SIGALTSTACK_SS_REVERSED 1 >/* end confdefs.h. */ > >#include <stdlib.h> >#include <signal.h> >#include <setjmp.h> >#include <ucontext.h> >#ifndef SS_ONSTACK >#define SS_ONSTACK SA_ONSTACK >#endif > >#if HAVE_SETRLIMIT ># include <sys/types.h> ># include <sys/time.h> ># include <sys/resource.h> >#endif >#ifndef SIGSTKSZ ># define SIGSTKSZ 16384 >#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); >} >volatile int * recurse_1 (volatile int n, volatile int *p) >{ > if (n >= 0) > *recurse_1 (n + 1, p) += n; > return p; >} >int recurse (volatile int n) >{ > int sum = 0; > return *recurse_1 (n, &sum); >} >int main () >{ > char mystack[2 * SIGSTKSZ]; > 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. Use the midpoint of mystack, to guard > against a buggy interpretation of ss_sp on IRIX. */ > altstack.ss_sp = mystack + SIGSTKSZ; > altstack.ss_size = SIGSTKSZ; > 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); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 282017
: 201708