Summary: | Valgrind crashes with dwz optimized debuginfo | ||
---|---|---|---|
Product: | [Developer tools] valgrind | Reporter: | Jakub Jelinek <jakub> |
Component: | general | Assignee: | Julian Seward <jseward> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | mark, sam, thierry.vignaud, tromey |
Priority: | NOR | ||
Version: | 3.7 SVN | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
valgrind-dwz-1.patch
valgrind-dwz-2.patch |
Description
Jakub Jelinek
2012-07-02 14:19:20 UTC
Created attachment 72281 [details]
valgrind-dwz-1.patch
WIP patch (needs actual handling of the DW_FORM_GNU_ref_alt references and possibly also
adding support for DW_TAG_partial_unit and/or DW_TAG_imported_unit).
OT, glibc 2.16 has just been released and Fedora 18 is likely going to use it (if not 2.17), so it would be nice if valgrind 3.8.0 also supported glibc 2.16 out of the box in configury. Created attachment 72306 [details]
valgrind-dwz-2.patch
Updated patch. Th emain remaining problem seems to be in that partial units, as the standard allows, aren't self-contained, they usually don't have DW_AT_language attribute, thus the type parsing code sees ->language == '?' and doesn't add the right implicit lower bounds to the array bounds. What perhaps could be done is look through the DW_TAG_imported_unit DW_AT_import references and recursively mark the language kind of the partial units (in the usual case that a partial unit has all (possibly indirect) references from CUs of the same language kind, that language kind could be used, otherwise one would need to defer that decision at the point where a type is actually used.
In any case, I think the patch is an incremental progress, at least valgrind won't crash on such debuginfo.
Looks good to me. Will push into trunk in the next few days. If you have any improved version I'll take that too :-) (In reply to comment #3) > Created attachment 72306 [details] > valgrind-dwz-2.patch Committed, with small fix (removal of inner declaration) to fix this: m_debuginfo/readelf.c: In function ‘vgModuleLocal_read_elf_debug_info’: m_debuginfo/readelf.c:2522: warning: declaration of ‘j’ shadows a previous local m_debuginfo/readelf.c:1317: warning: shadowed declaration is here Thanks for the patch. Do you want to close this bug now and put followup patches on a new bug, or keep this one open? (In reply to comment #5) > Committed, with small fix (removal of inner declaration) to fix this: r12742, I forgot to mention. (In reply to comment #2) > OT, glibc 2.16 has just been released and Fedora 18 is likely going to use Can you try with >= r12473 -- this allows the configure script to accept glibc-2.16. *** Bug 298870 has been marked as a duplicate of this bug. *** |