From 46022f276b1b81f40f5f55dbc5d4d0c13146536d Mon Sep 17 00:00:00 2001 From: Daniel Eischen Date: Sun, 6 May 2001 02:13:12 +0000 Subject: [PATCH] When setting up the frame to invoke a signal handler, preserve the %fs and %gs registers instead of setting them to known sane values. %fs is going to be used for thread/KSE specific data by the new threads library; we'll want it to be valid inside of signal handlers. According to bde, Linux preserves the state of %fs and %gs when setting up signal handlers, so there is precedent for doing this. The same changes should be made in the Linux emulator, but when made, they seem to break (at least one version of) the IBM JDK for Linux (reported by drew). Approved by: bde --- sys/amd64/amd64/machdep.c | 2 -- sys/i386/i386/machdep.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index c89852a79b0b..8d77658629b0 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -745,8 +745,6 @@ sendsig(catcher, sig, mask, code) regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; - regs->tf_fs = _udatasel; - load_gs(_udatasel); regs->tf_ss = _udatasel; } diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index c89852a79b0b..8d77658629b0 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -745,8 +745,6 @@ sendsig(catcher, sig, mask, code) regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; regs->tf_es = _udatasel; - regs->tf_fs = _udatasel; - load_gs(_udatasel); regs->tf_ss = _udatasel; }