This is the mail archive of the
rda@sources.redhat.com
mailing list for the rda project.
Re: [PATCH] thread-db.c: Avoid segfault by making sure that ``reg'' is initialized
Kevin Buettner <kevinb@redhat.com> writes:
> On Thu, 18 Nov 2004 18:02:40 -0700
> Kevin Buettner <kevinb@redhat.com> wrote:
>
> > [Hopefully, this'll end up in the right list this time...]
> >
> > I've just committed the patch below. As indicated by the subject line, this
> > patch prevents a segfault when thread_db_set_thread_reg() returns an
> > uninitialized ``reg''. (This was happening on Fedora Core 2 due to lack of
> > xregset support.)
> >
> > * thread-db.c (thread_db_set_thread_reg): Don't allow a successful
> > return without first initializing ``reg''.
>
> This patch was wrong - I didn't look closely enough at the result of
> applying a patch from a branch. Hopefully, this time I've applied the
> correct fix...
>
> * thread-db.c (thread_db_get_thread_reg): Don't allow a successful
> return without first initializing ``reg''.
> (thread_db_set_thread_reg): Remove code intended to for
> thread_db_get_thread_reg().
That's it --- no soup for you!