mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
avoid type aliasing warnings
This commit is contained in:
parent
3a87011190
commit
4378110506
@ -70,11 +70,13 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
|||||||
if (signal == SegFaultSignal) {
|
if (signal == SegFaultSignal) {
|
||||||
ucontext_t* c = static_cast<ucontext_t*>(context);
|
ucontext_t* c = static_cast<ucontext_t*>(context);
|
||||||
|
|
||||||
|
void* ip = reinterpret_cast<void*>(IP_REGISTER(c));
|
||||||
|
void* base = reinterpret_cast<void*>(BASE_REGISTER(c));
|
||||||
|
void* stack = reinterpret_cast<void*>(STACK_REGISTER(c));
|
||||||
|
void* thread = reinterpret_cast<void*>(THREAD_REGISTER(c));
|
||||||
|
|
||||||
bool jump = segFaultHandler->handleSignal
|
bool jump = segFaultHandler->handleSignal
|
||||||
(reinterpret_cast<void**>(&IP_REGISTER(c)),
|
(&ip, &base, &stack, &thread);
|
||||||
reinterpret_cast<void**>(&BASE_REGISTER(c)),
|
|
||||||
reinterpret_cast<void**>(&STACK_REGISTER(c)),
|
|
||||||
reinterpret_cast<void**>(&THREAD_REGISTER(c)));
|
|
||||||
|
|
||||||
if (jump) {
|
if (jump) {
|
||||||
// I'd like to use setcontext here (and get rid of the
|
// I'd like to use setcontext here (and get rid of the
|
||||||
@ -88,10 +90,7 @@ handleSignal(int signal, siginfo_t* info, void* context)
|
|||||||
sigaddset(&set, SegFaultSignal);
|
sigaddset(&set, SegFaultSignal);
|
||||||
sigprocmask(SIG_UNBLOCK, &set, 0);
|
sigprocmask(SIG_UNBLOCK, &set, 0);
|
||||||
|
|
||||||
vmJump(reinterpret_cast<void*>(IP_REGISTER(c)),
|
vmJump(ip, base, stack, thread);
|
||||||
reinterpret_cast<void*>(BASE_REGISTER(c)),
|
|
||||||
reinterpret_cast<void*>(STACK_REGISTER(c)),
|
|
||||||
reinterpret_cast<void*>(THREAD_REGISTER(c)));
|
|
||||||
} else if (oldSegFaultHandler.sa_flags & SA_SIGINFO) {
|
} else if (oldSegFaultHandler.sa_flags & SA_SIGINFO) {
|
||||||
oldSegFaultHandler.sa_sigaction(signal, info, context);
|
oldSegFaultHandler.sa_sigaction(signal, info, context);
|
||||||
} else if (oldSegFaultHandler.sa_handler) {
|
} else if (oldSegFaultHandler.sa_handler) {
|
||||||
|
Loading…
Reference in New Issue
Block a user