Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/external/cddl/osnet/dist/tools/ctf/cvt



Module Name:    src
Committed By:   darran
Date:           Tue Jan 10 08:42:22 UTC 2012

Modified Files:
        src/external/cddl/osnet/dist/tools/ctf/cvt: ctf.c dwarf.c

Log Message:
Fix a segfault in ctfmerge.

GCC can generate bogus dwarf attributes with DW_AT_byte_size set to 0xFFFFFFFF.
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35998 .

GCC is currently doing this for external/bsd/tmux/dist/compat/imsg-buffer.c:
    readelf -a --debug-dump imsg-buffer.o
        ...
         <2><6e3>: Abbrev Number: 32 (DW_TAG_union_type)
            <6e4>   DW_AT_byte_size   : 0xffffffff
            <6e8>   DW_AT_decl_file   : 1
            <6e9>   DW_AT_decl_line   : 229
            <6ea>   DW_AT_sibling     : <0x705>

This resulted in ctfconvert generating a faulty CTF entry which then caused the
segfault in ctfmerge.

The fix has ctfconvert check for the bogus 0xFFFFFFFF value and works around it.
It also adds some protection to ctfmerge to avoid the segfault and fail
more gracefully if the error should occur in the future.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dist/tools/ctf/cvt/ctf.c
cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dist/tools/ctf/cvt/dwarf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index