p4c
p4c copied to clipboard
Support non-field LHS in parser on BMv2
Fixes #4194.
@fruffy The failures seem to be P4Testgen related. Do you have an idea what might be the issue?
This looks like a problem with the parserUnroll pass. P4Testgen uses it. That pass is unfortunately quite complex and I do not know it very well. This might be difficult to debug. You could add these failures to Xfails.
@VolodymyrPeschanenko Could you take a look if you have time? Maybe it is an easy fix.
These are SIGSEGV, should be easy to diagnose and fix.
These are SIGSEGV, should be easy to diagnose and fix.
Well the crash happens at here because it is trying to clone the constant of an uninitialized SymbolicInteger
. Why that integer is uninitialized I am not sure.
A SymbolicInteger does not have to have a constant value (otherwise it would be just a constant). If the constant value is nullptr then this function should probably just return, similar to the test two lines above.
This looks like a problem with the parserUnroll pass. P4Testgen uses it. That pass is unfortunately quite complex and I do not know it very well. This might be difficult to debug. You could add these failures to Xfails.
@VolodymyrPeschanenko Could you take a look if you have time? Maybe it is an easy fix.
I'll see on it tomorrow.
The failing DPDK PTF test dpdk-ptf/testdata/p4_16_samples/pna-dpdk-add_on_miss0.p4
seems irrelevant to this PR.
The failure is caused by instability in infrap4d
. You can ignore it as this run is not required for merging.
The encountered bug is covered in #4200.
Is this ready to be merged?
@antoninbas Could you help review the bmv2 backend changes? I guess you might have the most context here. Thanks!