diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2013-07-26 00:28:19 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2013-07-26 00:28:19 +0000 |
commit | c7cdfecc89a74be5407ba79d8c10d2257660e2ef (patch) | |
tree | 3835e545a57881bdfab8b9c6b637002224d90e6d /cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c | |
parent | f1bd660622f79e7493b62544e9230fd983f935dc (diff) | |
download | src-c7cdfecc89a74be5407ba79d8c10d2257660e2ef.tar.gz src-c7cdfecc89a74be5407ba79d8c10d2257660e2ef.zip |
Fix a segfault in ctfmerge due to a bug in gcc.
GCC can generate bogus dwarf attributes with DW_AT_byte_size
set to 0xFFFFFFFF.
The issue was originaly detected in NetBSD but it has been
adapted for portability and to avoid compiler warnings.
Reference:
https://www.illumos.org/issues/3776
Obtained from: NetBSD
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=253661
Diffstat (limited to 'cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c')
-rw-r--r-- | cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c b/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c index 21a0149861be..e136c94ab9b0 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/st_parse.c @@ -952,7 +952,7 @@ soudef(char *cp, stabtype_t type, tdesc_t **rtdp) itdp = find_intrinsic(tdp); if (itdp->t_type == INTRINSIC) { - if (mlp->ml_size != itdp->t_intr->intr_nbits) { + if ((int)mlp->ml_size != itdp->t_intr->intr_nbits) { parse_debug(4, cp, "making %d bit intrinsic " "from %s", mlp->ml_size, tdesc_name(itdp)); mlp->ml_type = bitintrinsic(itdp, mlp->ml_size); @@ -1173,7 +1173,7 @@ resolve_typed_bitfields_cb(void *arg, void *private __unused) while (tdp) { switch (tdp->t_type) { case INTRINSIC: - if (ml->ml_size != tdp->t_intr->intr_nbits) { + if ((int)ml->ml_size != tdp->t_intr->intr_nbits) { debug(3, "making %d bit intrinsic from %s", ml->ml_size, tdesc_name(tdp)); ml->ml_type = bitintrinsic(tdp, ml->ml_size); |