Stop reloading %fs and %gs, since it causes the base address from

GDT to be loaded into FS.base and GS.base, these values of course
are not the values set by sysarch() with I386_SET_FSBASE and
I386_SET_GSBASE, the change fixed a crash for 32bit libthr after
signal handler returned and normal code is accessing thread pointer,
for example: movl %gs:8, %eax.
This commit is contained in:
David Xu 2006-09-23 13:42:09 +00:00
parent 5bae3124ab
commit 07a8ebcc75
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162572

View file

@ -45,8 +45,6 @@ ia32_sigcode:
calll *IA32_SIGF_HANDLER(%esp)
leal IA32_SIGF_UC(%esp),%eax /* get ucontext */
pushl %eax
movl IA32_UC_GS(%eax),%gs /* restore %gs */
movl IA32_UC_FS(%eax),%fs /* restore %fs */
movl IA32_UC_ES(%eax),%es /* restore %es */
movl IA32_UC_DS(%eax),%ds /* restore %ds */
movl $SYS_sigreturn,%eax
@ -62,8 +60,6 @@ freebsd4_ia32_sigcode:
calll *IA32_SIGF_HANDLER(%esp)
leal IA32_SIGF_UC4(%esp),%eax/* get ucontext */
pushl %eax
movl IA32_UC4_GS(%eax),%gs /* restore %gs */
movl IA32_UC4_FS(%eax),%fs /* restore %fs */
movl IA32_UC4_ES(%eax),%es /* restore %es */
movl IA32_UC4_DS(%eax),%ds /* restore %ds */
movl $344,%eax /* 4.x SYS_sigreturn */