8255577: Possible issues with SR_initialize
Reviewed-by: shade, stuefe
This commit is contained in:
parent
9332071784
commit
d017e98856
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -1556,8 +1556,6 @@ void PosixSignals::hotspot_sigmask(Thread* thread) {
|
|||||||
// - Forte Analyzer: AsyncGetCallTrace()
|
// - Forte Analyzer: AsyncGetCallTrace()
|
||||||
// - StackBanging: get_frame_at_stack_banging_point()
|
// - StackBanging: get_frame_at_stack_banging_point()
|
||||||
|
|
||||||
sigset_t SR_sigset;
|
|
||||||
|
|
||||||
static void resume_clear_context(OSThread *osthread) {
|
static void resume_clear_context(OSThread *osthread) {
|
||||||
osthread->set_ucontext(NULL);
|
osthread->set_ucontext(NULL);
|
||||||
osthread->set_siginfo(NULL);
|
osthread->set_siginfo(NULL);
|
||||||
@ -1673,14 +1671,11 @@ int SR_initialize() {
|
|||||||
assert(PosixSignals::SR_signum > SIGSEGV && PosixSignals::SR_signum > SIGBUS,
|
assert(PosixSignals::SR_signum > SIGSEGV && PosixSignals::SR_signum > SIGBUS,
|
||||||
"SR_signum must be greater than max(SIGSEGV, SIGBUS), see 4355769");
|
"SR_signum must be greater than max(SIGSEGV, SIGBUS), see 4355769");
|
||||||
|
|
||||||
sigemptyset(&SR_sigset);
|
|
||||||
sigaddset(&SR_sigset, PosixSignals::SR_signum);
|
|
||||||
|
|
||||||
// Set up signal handler for suspend/resume
|
// Set up signal handler for suspend/resume
|
||||||
act.sa_flags = SA_RESTART|SA_SIGINFO;
|
act.sa_flags = SA_RESTART|SA_SIGINFO;
|
||||||
act.sa_handler = (void (*)(int)) SR_handler;
|
act.sa_handler = (void (*)(int)) SR_handler;
|
||||||
|
|
||||||
// SR_signum is blocked by default.
|
// SR_signum is blocked when the handler runs.
|
||||||
pthread_sigmask(SIG_BLOCK, NULL, &act.sa_mask);
|
pthread_sigmask(SIG_BLOCK, NULL, &act.sa_mask);
|
||||||
remove_error_signals_from_set(&(act.sa_mask));
|
remove_error_signals_from_set(&(act.sa_mask));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user