< prev index next >

src/hotspot/os/posix/vmError_posix.cpp

Print this page
rev 59383 : [mq]: final
   1 /*
   2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "memory/metaspaceShared.hpp"
  27 #include "runtime/arguments.hpp"
  28 #include "runtime/os.hpp"
  29 #include "runtime/thread.hpp"
  30 #include "utilities/debug.hpp"
  31 #include "utilities/vmError.hpp"
  32 
  33 #include <sys/types.h>
  34 #include <sys/wait.h>
  35 #include <signal.h>
  36 
  37 #ifdef LINUX
  38 #include <sys/syscall.h>
  39 #include <unistd.h>
  40 #endif
  41 #ifdef SOLARIS
  42 #include <thread.h>
  43 #endif
  44 #ifdef AIX
  45 #include <unistd.h>
  46 #endif
  47 #ifdef BSD
  48 #include <sys/syscall.h>
  49 #include <unistd.h>
  50 #endif
  51 
  52 
  53 // handle all synchronous program error signals which may happen during error
  54 // reporting. They must be unblocked, caught, handled.
  55 
  56 static const int SIGNALS[] = { SIGSEGV, SIGBUS, SIGILL, SIGFPE, SIGTRAP }; // add more if needed
  57 static const int NUM_SIGNALS = sizeof(SIGNALS) / sizeof(int);
  58 
  59 // Space for our "saved" signal flags and handlers
  60 static int resettedSigflags[NUM_SIGNALS];
  61 static address resettedSighandler[NUM_SIGNALS];
  62 


   1 /*
   2  * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "memory/metaspaceShared.hpp"
  27 #include "runtime/arguments.hpp"
  28 #include "runtime/os.hpp"
  29 #include "runtime/thread.hpp"
  30 #include "utilities/debug.hpp"
  31 #include "utilities/vmError.hpp"
  32 
  33 #include <sys/types.h>
  34 #include <sys/wait.h>
  35 #include <signal.h>
  36 
  37 #ifdef LINUX
  38 #include <sys/syscall.h>
  39 #include <unistd.h>



  40 #endif
  41 #ifdef AIX
  42 #include <unistd.h>
  43 #endif
  44 #ifdef BSD
  45 #include <sys/syscall.h>
  46 #include <unistd.h>
  47 #endif
  48 
  49 
  50 // handle all synchronous program error signals which may happen during error
  51 // reporting. They must be unblocked, caught, handled.
  52 
  53 static const int SIGNALS[] = { SIGSEGV, SIGBUS, SIGILL, SIGFPE, SIGTRAP }; // add more if needed
  54 static const int NUM_SIGNALS = sizeof(SIGNALS) / sizeof(int);
  55 
  56 // Space for our "saved" signal flags and handlers
  57 static int resettedSigflags[NUM_SIGNALS];
  58 static address resettedSighandler[NUM_SIGNALS];
  59 


< prev index next >