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: #226

Closed
jnfoster opened this issue Jan 12, 2017 · 1 comment
Closed

compiler bug: #226

jnfoster opened this issue Jan 12, 2017 · 1 comment
Assignees
Labels
fixed This topic is considered to be fixed.

Comments

@jnfoster
Copy link
Contributor

Compiling the following program with p4c,

header_type ethernet_t {
    fields {
        dstAddr : 48;
        srcAddr : 48;
        etherType : 16;
    }
}

header ethernet_t ethernet;

parser parse_ethernet {
    extract(ethernet);
    return ingress;
}

parser start {
    return parse_ethernet;
}

action my_drop() {
    drop();
}

action forward(port) {
    modify_field(standard_metadata.egress_port, port);
}

table dmac {
    reads {
        ethernet.dstAddr : exact;
    }
    actions {forward; drop;}
    size : 512;
}

control ingress{
    apply(dmac);
}

crashes with a sensible error message, then a core dump:

error: Cannot locate action drop
terminate called after throwing an instance of 'Util::CompilerBug'
  what():  COMPILER BUG: ../ir/id.h:38
Identifier with no name

Aborted (core dumped)
mihaibudiu pushed a commit to mihaibudiu/p4c-clone that referenced this issue Jan 12, 2017
@ChrisDodd ChrisDodd added the fixed This topic is considered to be fixed. label Feb 2, 2017
@jnfoster
Copy link
Contributor Author

jnfoster commented Feb 2, 2017

Just pulled and verified that this is fixed. Thanks @ChrisDodd!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed This topic is considered to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants