kdb
[Top] [All Lists]

Re: [PATCH] oops on entry to kdb with gcc 3.1

To: Keith Owens <kaos@xxxxxxx>, jim.houston@xxxxxxxxx, kdb@xxxxxxxxxxx
Subject: Re: [PATCH] oops on entry to kdb with gcc 3.1
From: Dave Anderson <anderson@xxxxxxxxxx>
Date: Thu, 01 Aug 2002 10:02:59 -0400
Organization: Red Hat, Inc.
References: <23430.1028205987@xxxxxxxxxxxxxxxxxxxxx>
Sender: owner-kdb@xxxxxxxxxxx
Keith Owens wrote:

> On Thu, 1 Aug 2002 07:20:36 -0400,
> Jim Houston <jim.houston@xxxxxxxxx> wrote:
> >Compiling the kdb with gcc 3.1 breaks kdba_setjmp.  It seems
> >that gcc 3.1 is more clever about omiting frame pointers for
> >leaf functions.  When it does this for kdba_setjmp it causes an
> >oops on entry to kdb.
> >
> >The attached patch uses the gcc built in functions to get the
> >frame pointer and the return adddress.  This gets rid of the hard
> >coded stack offsets and should make it more portable.
>
> Does __builtin_frame_address work for older gcc, even if you compile
> the kernel without frame pointers?  I vaguely remember that it returns
> garbage on older versions of gcc if ebp is not dedicated.

We've been seeing this kdb_setjmp oops on Red Hat 7.2 and Advanced
Server kernels when entering kdb via the Pause key.  Both kernels
are built with gcc 2.96 and with -fomit-frame-pointer.

In any case, Jim's patch fixes the problem.

Dave Anderson



<Prev in Thread] Current Thread [Next in Thread>