NetBSD/external/cddl
darran 9a00affba3 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.
2012-01-10 08:42:22 +00:00
..
osnet Fix a segfault in ctfmerge. 2012-01-10 08:42:22 +00:00
Makefile DTrace: have DTrace build with out requiring MKZFS=yes. 2010-02-25 00:14:10 +00:00