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

Invalid JSON #356

Closed
mihaibudiu opened this issue Mar 9, 2017 · 0 comments
Closed

Invalid JSON #356

mihaibudiu opened this issue Mar 9, 2017 · 0 comments

Comments

@mihaibudiu
Copy link
Contributor

The following program generates JSON which crashes BMv2:

#include <core.p4>
#include <v1model.p4>

struct H {
}

struct M {
}

control DeparserI(packet_out packet, in H hdr) {
    apply {
    }
}

parser parserI(packet_in pkt, out H hdr, inout M meta, inout standard_metadata_t stdmeta) {
    state start {
        transition select(pkt.lookahead<bit<112>>()[111:96]) {
            16w0x1000 &&& 16w0x1000: accept;
        }
    }
}

control cIngress(inout H hdr, inout M meta, inout standard_metadata_t stdmeta) {
    apply {
    }
}

control cEgress(inout H hdr, inout M meta, inout standard_metadata_t stdmeta) {
    apply {
    }
}

control vc(in H hdr, inout M meta) {
    apply {
    }
}

control uc(inout H hdr, inout M meta) {
    apply {
    }
}

V1Switch<H, M>(parserI(), vc(), cIngress(), cEgress(), uc(), DeparserI()) main;
mihaibudiu pushed a commit to mihaibudiu/p4c-clone that referenced this issue Mar 18, 2017
…m the language and the associated tests
mihaibudiu pushed a commit to mihaibudiu/p4c-clone that referenced this issue Mar 18, 2017
…m the language and the associated tests
mihaibudiu pushed a commit to mihaibudiu/p4c-clone that referenced this issue Mar 24, 2017
…m the language and the associated tests
ChrisDodd pushed a commit that referenced this issue Mar 24, 2017
hanw pushed a commit to hanw/p4c that referenced this issue Apr 4, 2017
…m the language and the associated tests
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