davidchisnall / dtc

FreeBSD Device Tree Compiler
19 stars 15 forks source link

dtc crashes when there is a reference to a non-unique label #6

Closed zxombie closed 8 years ago

zxombie commented 8 years ago

If there is a reference to a non-unique label dtc will complain, then crash. An example is:

/dts-v1/;

/ {
    baz {
        ref = <&bar0>;
    };

    bar0: bar {
    };

    bar0: bar {
    };
};

GNU dtc complains on this:

ERROR (duplicate_node_names): Duplicate node name /bar
ERROR: Input tree has errors, aborting (use -f to force output)

The -f option seems to give some output, but I don't think we need to copy it.