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

COMPILER BUG: ../frontends/p4/typeChecking/typeChecker.h:99 #113

Closed
smolkaj opened this issue Oct 21, 2016 · 4 comments
Closed

COMPILER BUG: ../frontends/p4/typeChecking/typeChecker.h:99 #113

smolkaj opened this issue Oct 21, 2016 · 4 comments

Comments

@smolkaj
Copy link
Member

smolkaj commented Oct 21, 2016

I get the following error

what():  COMPILER BUG: ../frontends/p4/typeChecking/typeChecker.h:99
l2.p4(161): Could not find type of meta.ingress_metadata.bypass_lookups & (bit<16>)128;
        if (((meta.ingress_metadata.bypass_lookups & 0x0080) == 0) &&
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Aborted (core dumped)

The field bypass_lookups is of type bit<16>. I'm happy to provide more details if needed.

@mihaibudiu
Copy link
Contributor

You may need to provide more details, this is too incomplete to create a reproduction.
If you can create a test case in p4_16_samples which exhibits the error it is best. If the test is for the p4c-bm2-ss compiler you should name the test as follows: name-bmv2.p4.

This may be due to the fact that the compiler calls getType(expression) instead getType(getOriginal()) in a Pass which is a Transformer. You can find out which pass is crashing by running the compiler with the flag -Tpass_manager:1

@smolkaj
Copy link
Member Author

smolkaj commented Oct 21, 2016

@mbudiu-vmw: done, see #114. It's caused by a call to extern void digest<T>(in bit<32> receiver, in T data), for some reason.

@mihaibudiu
Copy link
Contributor

I have amended my last pull request with a fix for this bug as well.
We should also merge your pull request; I didn't add the test myself.

ChrisDodd pushed a commit that referenced this issue Oct 24, 2016
@smolkaj
Copy link
Member Author

smolkaj commented Oct 25, 2016

Seems to work.

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

2 participants