diff options
| author | Russ Cox <rsc@golang.org> | 2010-04-08 18:15:30 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2010-04-08 18:15:30 -0700 |
| commit | 2d19c2d8f2a9d759ecfa73d07ed1bab66f8ac24f (patch) | |
| tree | 9042a434db46b9ee490ca915723872f355fd60f2 /src/pkg/runtime/linux/defs.c | |
| parent | 1fa9a0c209f50aa6b8eac0755ce6ccd00ff2cf02 (diff) | |
| download | golang-2d19c2d8f2a9d759ecfa73d07ed1bab66f8ac24f.tar.gz | |
runtime: turn divide by zero, nil dereference into panics
tested on linux/amd64, linux/386, linux/arm, darwin/amd64, darwin/386.
freebsd untested; will finish in a separate CL.
for now all the panics are errorStrings.
richer structures can be added as necessary
once the mechanism is shaked out.
R=r
CC=golang-dev
http://codereview.appspot.com/906041
Diffstat (limited to 'src/pkg/runtime/linux/defs.c')
| -rw-r--r-- | src/pkg/runtime/linux/defs.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/pkg/runtime/linux/defs.c b/src/pkg/runtime/linux/defs.c index 35fa02953..f3bdb61fa 100644 --- a/src/pkg/runtime/linux/defs.c +++ b/src/pkg/runtime/linux/defs.c @@ -32,6 +32,53 @@ enum { $SA_ONSTACK = SA_ONSTACK, $SA_RESTORER = SA_RESTORER, $SA_SIGINFO = SA_SIGINFO, + + $SIGHUP = SIGHUP, + $SIGINT = SIGINT, + $SIGQUIT = SIGQUIT, + $SIGILL = SIGILL, + $SIGTRAP = SIGTRAP, + $SIGABRT = SIGABRT, + $SIGBUS = SIGBUS, + $SIGFPE = SIGFPE, + $SIGKILL = SIGKILL, + $SIGUSR1 = SIGUSR1, + $SIGSEGV = SIGSEGV, + $SIGUSR2 = SIGUSR2, + $SIGPIPE = SIGPIPE, + $SIGALRM = SIGALRM, + $SIGSTKFLT = SIGSTKFLT, + $SIGCHLD = SIGCHLD, + $SIGCONT = SIGCONT, + $SIGSTOP = SIGSTOP, + $SIGTSTP = SIGTSTP, + $SIGTTIN = SIGTTIN, + $SIGTTOU = SIGTTOU, + $SIGURG = SIGURG, + $SIGXCPU = SIGXCPU, + $SIGXFSZ = SIGXFSZ, + $SIGVTALRM = SIGVTALRM, + $SIGPROF = SIGPROF, + $SIGWINCH = SIGWINCH, + $SIGIO = SIGIO, + $SIGPWR = SIGPWR, + $SIGSYS = SIGSYS, + + $FPE_INTDIV = FPE_INTDIV, + $FPE_INTOVF = FPE_INTOVF, + $FPE_FLTDIV = FPE_FLTDIV, + $FPE_FLTOVF = FPE_FLTOVF, + $FPE_FLTUND = FPE_FLTUND, + $FPE_FLTRES = FPE_FLTRES, + $FPE_FLTINV = FPE_FLTINV, + $FPE_FLTSUB = FPE_FLTSUB, + + $BUS_ADRALN = BUS_ADRALN, + $BUS_ADRERR = BUS_ADRERR, + $BUS_OBJERR = BUS_OBJERR, + + $SEGV_MAPERR = SEGV_MAPERR, + $SEGV_ACCERR = SEGV_ACCERR, }; typedef struct timespec $Timespec; |
