[PATCH] thread-db.c: Avoid segfault by making sure that ``reg'' is initialized

Kevin Buettner kevinb@redhat.com
Fri Nov 19 01:05:00 GMT 2004


On Thu, 18 Nov 2004 14:44:57 -0700
Kevin Buettner <kevinb@redhat.com> wrote:

> 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''.

My apologies for sending this to the wrong list.  This is an RDA patch, and
as such, I intended to send it to the RDA list.

Kevin



More information about the Gdb mailing list