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: Exiting with SIGSEGV #2648

Closed
fruffy opened this issue Jan 8, 2021 · 2 comments · Fixed by #2653
Closed

Compiler Bug: Exiting with SIGSEGV #2648

fruffy opened this issue Jan 8, 2021 · 2 comments · Fixed by #2653
Assignees
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.

Comments

@fruffy
Copy link
Collaborator

fruffy commented Jan 8, 2021

The following program crashes with SIGSEGV in StructInitializers_0_TypeChecking.

bit<8> give_value(H dummy_hdr) {
    return dummy_hdr.a;
}

parser p(packet_in pkt, out Headers hdr) {
    state start {
        transition parse_hdrs;
    }
    state parse_hdrs {
        transition accept;
    }
}

control ingress(inout Headers h) {
    apply {
        h.h[give_value({8w1})].a = 8w1;
    }
}
terminate called after throwing an instance of 'Util::CompilerBug'                                                  
  what():  In file: /storage/Projekte/p4_tv/modules/p4c/lib/crash.cpp:256                                           
Compiler Bug: Exiting with SIGSEGV     

index_crash.p4.txt

@mihaibudiu mihaibudiu self-assigned this Jan 8, 2021
@mihaibudiu
Copy link
Contributor

I cannot reproduce this problem using p4test.

@fruffy
Copy link
Collaborator Author

fruffy commented Jan 15, 2021

This crash only seems to appear when the binaries are compiled in release mode.

@mihaibudiu mihaibudiu added fixed This topic is considered to be fixed. bug This behavior is unintended and should be fixed. and removed invalid labels Jan 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants