Skip to content

Commit

Permalink
2008-03-08 Roland McGrath <roland@frob.com>
Browse files Browse the repository at this point in the history
	* sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler):
	Clear DF bit in thread state's eflags.
	Reported by Samuel Thibault <samuel.thibault@ens-lyon.org>.
  • Loading branch information
Roland McGrath committed Mar 8, 2008
1 parent b327855 commit d2ea0b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sysdeps/mach/hurd/i386/trampoline.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Set thread_state for sighandler, and sigcontext to recover. i386 version.
Copyright (C) 1994,1995,1996,1997,1998,1999,2005
Copyright (C) 1994,1995,1996,1997,1998,1999,2005,2008
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Expand All @@ -21,6 +21,7 @@
#include <hurd/signal.h>
#include <hurd/userlink.h>
#include <thread_state.h>
#include <mach/machine/eflags.h>
#include <assert.h>
#include <errno.h>
#include "hurdfault.h"
Expand Down Expand Up @@ -218,6 +219,9 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
/* We pass the handler function to the trampoline code in %edx. */
state->basic.edx = (int) handler;

/* The x86 ABI says the DF bit is clear on entry to any function. */
state->basic.efl &= ~EFL_DF;

return scp;
}

Expand Down

0 comments on commit d2ea0b9

Please sign in to comment.