summaryrefslogtreecommitdiffstats
path: root/sys/mips/include/ucontext.h
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2012-03-06 07:50:45 +0000
committerjmallett <jmallett@FreeBSD.org>2012-03-06 07:50:45 +0000
commita14b2938a834ea913b22dcc43ff399403d137325 (patch)
tree8316c525a93e8d396ebe8859f59b756c4ca57ef7 /sys/mips/include/ucontext.h
parent00f892cca7dfff0d25fd2d10058ec295ec4b4193 (diff)
downloadFreeBSD-src-a14b2938a834ea913b22dcc43ff399403d137325.zip
FreeBSD-src-a14b2938a834ea913b22dcc43ff399403d137325.tar.gz
Fix two and a half oversights in COMPAT_FREEBSD32 related to contexts and
TLS: o) The mc_tls field used to store the TLS base when doing context gets and restores was left a pointer and not converted to a 32-bit integer. This had the bug of not correctly capturing the TLS value desired by the user, and the extra nastiness of making the structure the wrong size. o) The mc_tls field was not being saved by sendsig. As a result, the TLS base would always be set to NULL when restoring from a signal handler. Thanks to gonzo for helping track down a bunch of other TLS bugs that came out of tracking these down.
Diffstat (limited to 'sys/mips/include/ucontext.h')
-rw-r--r--sys/mips/include/ucontext.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/mips/include/ucontext.h b/sys/mips/include/ucontext.h
index aafd1dc..a37fe7e 100644
--- a/sys/mips/include/ucontext.h
+++ b/sys/mips/include/ucontext.h
@@ -73,7 +73,7 @@ typedef struct __mcontext32 {
int mc_fpused;
int32_t mc_fpregs[33];
int32_t mc_fpc_eir;
- void *mc_tls;
+ int32_t mc_tls;
int __spare__[8];
} mcontext32_t;
OpenPOWER on IntegriCloud