* [patch] linux-thread-db, check return value of find_thread_pid
@ 2007-06-28 22:42 msnyder
2007-06-28 23:04 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: msnyder @ 2007-06-28 22:42 UTC (permalink / raw)
To: gdb-patches
May return null, check before using.
2007-06-28 Michael Snyder <msnyder@access-company.com>
* linux-thread-db.c (thread_db_get_thread_local_address): Add
gdb_assert before using return value of find_thread_pid (Coverity).
Index: linux-thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/linux-thread-db.c,v
retrieving revision 1.32
diff -p -r1.32 linux-thread-db.c
*** linux-thread-db.c 27 Jun 2007 11:52:02 -0000 1.32
--- linux-thread-db.c 28 Jun 2007 22:31:48 -0000
*************** thread_db_get_thread_local_address (ptid
*** 1081,1086 ****
--- 1081,1087 ----
/* Get info about the thread. */
thread_info = find_thread_pid (ptid);
+ gdb_assert (thread_info);
thread_db_map_id2thr (thread_info, 1);
/* Finally, get the address of the variable. */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-28 22:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-28 22:42 [patch] linux-thread-db, check return value of find_thread_pid msnyder
2007-06-28 23:04 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox