This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: dwarf_getsrc_file Question


Hi Roland,

Thanks for the quick reply!  I just gave this a try and it appears that it
is close but not quite 100% correct.

When dwarf_getsrclines() returns (at line 92 of dwarf_getsrc_file.c), nlines
is uninitialized (not initialized at the declaration at line 91 nor in this
error case of dwarf_getsrclines()).  This appears to cause an error when
entering the for loop below (I didn't step through it or anything, but it
seems to return an error).  If I initialize nlines to 0 at line 91, then the
patch you supplied does indeed work.

I don't know if this is the ideal solution since there may be other callers
of dwarf_getsrc_lines() that need to have nlines initialized to 0 or not.

Thanks again for your help on this.  I will happily try out any additional
fixes that you make and would like me to test.

Please let me know if there is anything else I can do to help.

Thanks again!
--Mike


-----Original Message-----
From: Roland McGrath [mailto:roland@redhat.com] 
Sent: Thursday, July 16, 2009 7:15 PM
To: Mike Lindahl
Cc: elfutils-devel@lists.fedorahosted.org
Subject: Re: dwarf_getsrc_file Question

Can you try the roland/fix-getsrc_file-empty-cu branch from git?


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]