kern/52198: Kernel trap 12 when debugging fork() with ald
[/usr/ports/devel/ald]
Thomas Moestl
t.moestl at tu-bs.de
Wed May 14 03:40:21 PDT 2003
The following reply was made to PR kern/52198; it has been noted by GNATS.
From: Thomas Moestl <t.moestl at tu-bs.de>
To: Lolownia <lolownia at polbox.com>
Cc: FreeBSD-gnats-submit at freebsd.org
Subject: Re: kern/52198: Kernel trap 12 when debugging fork() with ald [/usr/ports/devel/ald]
Date: Wed, 14 May 2003 03:26:31 +0200
On Wed, 2003/05/14 at 03:19:24 +0200, Thomas Moestl wrote:
> On Wed, 2003/05/14 at 00:36:36 +0200, Lolownia wrote:
> >
> > >Number: 52198
> > >Category: kern
> > >Synopsis: Kernel trap 12 when debugging fork() with ald [/usr/ports/devel/ald]
> > [...]
> > When stepping through simple assembler program with fork() syscall,
> > system drops into DDB
> > db> trace
> > sw1b(2f,2f,2f,bfbff64c,bfbff654) at sw1b+0xa9
> > fork_trampoline() at fork_trampoline
> > --- trap 0xa, eip = 0x804849c, esp = 0xbfbff628, ebp = 0xbfbff644 ---
>
> This is a bug in cpu_fork(); it bogusly bases the kernel eflags to be
> set for a new process on the user eflags of the forking process (since
> a commit which seems to originally have been intended to clear PSL_I,
> about a year ago).
> The patch below should fix this; it will just use a sane initial
> value, since cloning the forking process' kernel eflags (as was done
> before the commit mentioned above)
Oops, actually, that commit introduced eflags saving and restoring in
cpu_switch() altogether, so scratch that remarks about the previous
behaviour. Need sleep.
The patch should be correct, however.
- Thomas
--
Thomas Moestl <t.moestl at tu-bs.de> http://www.tu-bs.de/~y0015675/
<tmm at FreeBSD.org> http://people.FreeBSD.org/~tmm/
PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C
More information about the freebsd-bugs
mailing list