Page MenuHomeFreeBSD

ctfmerge: Assert that there is enough room for types.
AbandonedPublic

Authored by bdrewery on Apr 22 2020, 7:07 PM.

Details

Summary

This isn't ready but I wanted to show what I'm running with. More fixes like
D24536 are needed first.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Hmm I had this at Isilon but not here.

--- cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
+++ cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
@@ -347,7 +347,7 @@ equiv_node(tdesc_t *ctdp, tdesc_t *mtdp, equiv_data_t *ed)
        int (*equiv)(tdesc_t *, tdesc_t *, equiv_data_t *);
        int mapping;

-       if (ctdp->t_emark > ed->ed_clear_mark ||
+       if (ctdp->t_emark > ed->ed_clear_mark &&
            mtdp->t_emark > ed->ed_clear_mark)
                return (ctdp->t_emark == mtdp->t_emark);

Hmm I had this at Isilon but not here.

--- cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
+++ cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
@@ -347,7 +347,7 @@ equiv_node(tdesc_t *ctdp, tdesc_t *mtdp, equiv_data_t *ed)
        int (*equiv)(tdesc_t *, tdesc_t *, equiv_data_t *);
        int mapping;

-       if (ctdp->t_emark > ed->ed_clear_mark ||
+       if (ctdp->t_emark > ed->ed_clear_mark &&
            mtdp->t_emark > ed->ed_clear_mark)
                return (ctdp->t_emark == mtdp->t_emark);

Ah this is already in FreeBSD.

cem added inline comments.
cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
455 ↗(On Diff #70887)

Are we still doing FreeBSD ifdefs (or ifndef illumos) in our CTF tools? I.e., is there an active upstream here?

This revision is now accepted and ready to land.Apr 23 2020, 2:20 AM
markj added inline comments.
cddl/contrib/opensolaris/tools/ctf/cvt/merge.c
455 ↗(On Diff #70887)

Not really. At least, in the past I haven't bothered delimiting our modifications unless they were specific to FreeBSD.

481 ↗(On Diff #70887)

ISCHILD is kind of a weird predicate to use, but I can't see a nicer way to express it using ctf.h macros. You might add a comment explaining why we do these checks.

Wasn't intended to be pushed yet.

FWIW, with CTFv3 landed I think this revision is obsolete.