This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
Re: [RFC] patch to fix finding sources
- To: "Martin M. Hunt" <hunt at redhat dot com>
- Subject: Re: [RFC] patch to fix finding sources
- From: Fernando Nasser <fnasser at cygnus dot com>
- Date: Tue, 06 Feb 2001 18:05:10 -0500
- CC: insight at sources dot redhat dot com
- Organization: Red Hat , Inc. - Toronto
- References: <Pine.SUN.4.33.0102061306510.5291-100000@rtl.cygnus.com>
"Martin M. Hunt" wrote:
>
> when you call full_lookup_symtab() you get a pointer to a symtab struct.
> If that pointer is NULL, it is probably an error. If the pointer is not
> null, st->fullname will be null if there if the sources are not found.
> So, your code needs changed around a bit to avoid dereferencing a null
> pointer.
>
> The real problem here is probably my comment on full_lookup_symtab() that
> says it always sets symtab->filename. Maybe we need a note that it will
> be set to null is the sources are not available.
>
Yes, I fell for that one:
This version */
/* also always makes sure symtab->fullname is set. */
Now looking at the code I see that it is not always true.
Please, by all means, send a patch to fix the comment.
Now that I know that I will rewrite the patch.
Thanks for the detailed explanation.
Regards,
Fernando
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9