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:[email protected]] Sent: Thursday, July 16, 2009 7:15 PM To: Mike Lindahl Cc: [email protected] Subject: Re: dwarf_getsrc_file Question Can you try the roland/fix-getsrc_file-empty-cu branch from git? Thanks, Roland _______________________________________________ elfutils-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/elfutils-devel
