Skip to content

Bug Report: Same field name in different header types leads to "Cannot unify" error #23

@chenxiaoqino

Description

@chenxiaoqino

The attached program has two header field types ip_hdr_prefix and udp_hdr, both has a field with name len. When accessing ip#len, the compiler errored:

error: bugreport_fieldname.dpt: Cannot unify
 {int<<16>> sport; int<<16>> dport; int<<16>> len; int<<16>> csum}
 with
 {int<<8>> v_ihl; int<<8>> tos; int<<16>> len; int<<16>> id; int<<16>> flags_frag; int<<8>> ttl; int<<8>> proto; int<<16>> csum}

Looks like the second "len" in udp_hdr caused the problem; changing it to some other field name will fix the issue.

bugreport_fieldname.dpt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions