Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chenxiaoqino opened this issue Feb 9, 2023 · 0 comments

Comments

@chenxiaoqino
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant