[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#440068: gnumach: GPT in fp_save, fpu.c:675



[Cced to <bug-hurd@gnu.org> as it's a GNU Mach bug.]


Hello!

On Wed, Aug 29, 2007 at 04:50:20PM +0200, Samuel Thibault wrote:
> Michael Banck, le Wed 29 Aug 2007 16:13:20 +0200, a écrit :
> > eax 0x107502f8
> 
> This is the culprit: fxsave needs the buffer to be 16 bytes-aligned. It

fnsave, you mean, I guess.

> looks like there is a bug somewhere in the alignment support of
> zalloc().

Would this be a correct patch?  Michael, how is this reproducible (if at
all?), so that we could check?


#v+
Index: i386/i386/fpu.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/i386/fpu.c,v
retrieving revision 1.2.4.11
diff -u -p -r1.2.4.11 fpu.c
--- i386/i386/fpu.c	8 May 2007 20:48:13 -0000	1.2.4.11
+++ i386/i386/fpu.c	29 Aug 2007 19:37:36 -0000
@@ -152,7 +152,7 @@ init_fpu()
 void
 fpu_module_init()
 {
-	ifps_zone = zinit(sizeof(struct i386_fpsave_state), 0,
+	ifps_zone = zinit(sizeof(struct i386_fpsave_state), 16,
 			  THREAD_MAX * sizeof(struct i386_fpsave_state),
 			  THREAD_CHUNK * sizeof(struct i386_fpsave_state),
 			  0, "i386 fpsave state");
#v-


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


Reply to: