1 /*
2 * Copyright (c) 1999, 2016, 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 *
420 } else {
421 // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219
422 return true;
423 }
424 }
425
426 JavaThread* thread = NULL;
427 VMThread* vmthread = NULL;
428
429 if (os::Solaris::signal_handlers_are_installed) {
430 if (t != NULL ){
431 if(t->is_Java_thread()) {
432 thread = (JavaThread*)t;
433 }
434 else if(t->is_VM_thread()){
435 vmthread = (VMThread *)t;
436 }
437 }
438 }
439
440 if (sig == os::Solaris::SIGasync()) {
441 if(thread || vmthread){
442 OSThread::SR_handler(t, uc);
443 return true;
444 } else if (os::Solaris::chained_handler(sig, info, ucVoid)) {
445 return true;
446 } else {
447 // If os::Solaris::SIGasync not chained, and this is a non-vm and
448 // non-java thread
449 return true;
450 }
451 }
452
453 if (info == NULL || info->si_code <= 0 || info->si_code == SI_NOINFO) {
454 // can't decode this kind of signal
455 info = NULL;
456 } else {
457 assert(sig == info->si_signo, "bad siginfo");
458 }
459
460 // decide if this trap can be handled by a stub
461 address stub = NULL;
462
463 address pc = NULL;
464
465 //%note os_trap_1
466 if (info != NULL && uc != NULL && thread != NULL) {
467 // factor me: getPCfromContext
|
1 /*
2 * Copyright (c) 1999, 2017, 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 *
420 } else {
421 // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219
422 return true;
423 }
424 }
425
426 JavaThread* thread = NULL;
427 VMThread* vmthread = NULL;
428
429 if (os::Solaris::signal_handlers_are_installed) {
430 if (t != NULL ){
431 if(t->is_Java_thread()) {
432 thread = (JavaThread*)t;
433 }
434 else if(t->is_VM_thread()){
435 vmthread = (VMThread *)t;
436 }
437 }
438 }
439
440 if (sig == ASYNC_SIGNAL) {
441 if(thread || vmthread){
442 OSThread::SR_handler(t, uc);
443 return true;
444 } else if (os::Solaris::chained_handler(sig, info, ucVoid)) {
445 return true;
446 } else {
447 // If ASYNC_SIGNAL not chained, and this is a non-vm and
448 // non-java thread
449 return true;
450 }
451 }
452
453 if (info == NULL || info->si_code <= 0 || info->si_code == SI_NOINFO) {
454 // can't decode this kind of signal
455 info = NULL;
456 } else {
457 assert(sig == info->si_signo, "bad siginfo");
458 }
459
460 // decide if this trap can be handled by a stub
461 address stub = NULL;
462
463 address pc = NULL;
464
465 //%note os_trap_1
466 if (info != NULL && uc != NULL && thread != NULL) {
467 // factor me: getPCfromContext
|