Skip to content

Latest commit

 

History

History

bugs

Bug Breakdown

This folder is an archive of all the bugs we have found and file while using Gauntlet. The following folder structure explains the meaning of the individual categories. Every folder also contains a fixed (fixed bugs) and rejected (maintainers did not deem the report a bug) subfolder. Bugs in the top-level directory are confirmed and open.

bugs
├── crash                   -- Crash bugs found in P4C. File numbers correspond to issues filed in https://github.com/p4lang/p4c/issues.
├── improvements            -- Issues that were considered "enhancements" by the compiler maintainers.  File numbers correspond to issues filed in https://github.com/p4lang/p4c/issues.
├── invalid_transformation  -- These are IR transformation that did not lead to a compiler bug but violated the invariant that the compiler IR must be valid at all times during compilation.
├── simple_switch           -- Bugs found in the simple switch software when running an stf test. File numbers correspond to issues filed in https://github.com/p4lang/behavioral-model/issues.
├── spec                    -- Specification issues that were uncovered when asking questions or filing bug reports. Numbers correspond to issues raised at https://github.com/p4lang/p4-spec/issues.
├── bf-p4c                  -- Bugs found in the compiler for the Tofino chip. More precisely for the tna.p4 package. We can only discuss the bugs we found and the type of the bug.
│   ├── crash               -- Simple compiler crashes.
│   ├── missing_pass        -- Crashes found in bf-p4c that were caused by the P4C front end not transforming passes correctly.
│   └── semantic            -- Semantic bugs that were uncovered using model-based testing using PTF and test packets.
└── validation              -- Semantics bugs that were uncovered in P4C using translation validation. The majority of bugs were also reproduced using model-based testing and an STF file is supplied with the bug.

Bug Tables

Last Updated: 2022-06-14

The bug tables provide the latest, detailed breakdown of all the issues we have filed in the open-source repositories.

Legend:

Fixed: ✔️    Confirmed: ❗    rejected: ⛔    Open: ❓

P4C Crash Bugs

Issue Location Compiler Stage Status
Compiler Bug: visitor returned non-Statement type (2102) 2102.p4 Mid end ✔️
Compiler Bug: no definitions (2104) 2104a.p4 Front end ✔️
Compiler Bug: no definitions (2104) 2104b.p4 Front end ✔️
Compiler Bug: no locations known for (2105) 2105.p4 Front end ✔️
InlineFunctions pass sometime seems to generate invalid code. (2126) 2126.p4 Front end ✔️
p4c-bm2-ss crashes on undefined header conditional in method (2148) 2148.p4 Mid end ✔️
Follow-up to issue 2104, exit also kills all variables (2151) 2151.p4 Front end ✔️
Compiler Bug: At this point in the compilation typechecking should not infer new types anymore, but it did. (2190) 2190.p4 Front end ✔️
Compiler Bug: Null cst (2206) 2206.p4 Front end ✔️
Compiler Bug: boost::too_few_args (2207) 2207.p4 Front end
Predication pass leads to unsafe variable assignment (2248c) 2248c.p4 Mid end ✔️
Compiler Bug: Null stat (2258a) 2258a.p4 Front end ✔️
"error: Duplicates declaration" when initializing struct in function with integer values (2261) 2261.p4 Front end ✔️
"Compiler Bug Null stat" also triggered in action properties (2266) 2266.p4 Front end ✔️
Compiler Bug: visitor returned invalid type Vector for IndexedVector (2289) 2289.p4 Mid end ✔️
Compiler Bug: Unexpected type <Type_Name> for nested headers (2290) 2290.p4 Front end ✔️
BMV2 Backend Compiler Bug unhandled case (2291) 2291.p4 Back end ✔️
Compiler Bug: Could not find type of @name (2336) 2336.p4 Front end ✔️
Compile-time-known and slices (2342) 2342.p4 Front end ✔️
Compiler Bug: Null cst for InfInt Parameters (2354) 2354.p4 Front end ✔️
Silent crash: Struct Parameters (2355) 2355.p4 Front end ✔️
Negative bit index in Slice after shifting function output (2356) 2356.p4 Front end ✔️
Int as parameter and assignments (2357) 2357.p4 Front end ✔️
Mixing exits and returns in actions (2359) 2359.p4 Mid end ✔️
Another expression with side-effects in table keys and actions (2362) 2362.p4 Front end ✔️
No Definitions in Parser Loop (2373) 2373.p4 Front end ✔️
Crash when running end-to-end tests with simple switch (2375) 2375.p4 Back end ✔️
Compiler Bug: no definitions (2393) 2393.p4 Front end ✔️
p4test: x: declaration not found (2435a) 2435a.p4 Mid end ✔️
Range starting from zero: Can not shift by a negative value (2485) 2485.p4 Mid end ✔️
Conditional execution in actions with struct initializers (2486) 2486.p4 Mid end
StructInitializer in Mux expressions (2487) 2487.p4 Mid end ✔️
p4c-bm2-ss: Compiler Bug: Could not convert to Json (2495) 2495.p4 Back end ✔️
Control Inlining: Key declaration not found (2542) 2542.p4 Front end
Some problems with function calls in struct initialization (2543a) 2543a.p4 Mid end ✔️
Some problems with function calls in struct initialization (2543b) 2543b.p4 Front end ✔️
Compiler Bug: Could not find type of <Declaration_Variable> for declaration of same name (2544) 2544.p4 Front end ✔️
Calling an extern with a local variable: read-only error (2545) 2545.p4 Mid end ✔️
Side-effect function call in table key (2546b) 2546b.p4 Front end ✔️
Compiler Bug : Null firstCall (2597) 2597.p4 Front end ✔️
Compiler Bug: Exiting with SIGSEGV (2648) 2648.p4 Mid end ✔️
simple_switch died with return code -6 (887) 887.p4 Back end ✔️

P4C Semantic Bugs

Issue Location Compiler Stage Status
SimplifyDefUse incorrectly removes assignment in actions with slices as arguments (2147) 2147.p4 Front end ✔️
Switchstatement: Assignment in switch-case removed (2153) 2153.p4 Mid end ✔️
Question about parser behavior with right shifts (2156) 2156.p4 Front end ✔️
Associative order of shift operators (2161) 2161.p4 Back end ✔️
RemoveReturns deletes return in SwitchStatements (2170) 2170.p4 Mid end ✔️
Assignment removed despite conditional return (2175) 2175.p4 Front end ✔️
Question on precise behavior of copy-out (2176) 2176.p4 Front end ✔️
Compiler Bug: At this point in the compilation typechecking should not infer new types anymore, but it did. (2190) 2190a.p4 Front end ✔️
Question on side-effect ordering (2205) 2205.p4 Front end ✔️
Clarification question on setInvalid (2212) 2212.p4 Front end
StrengthReduction ignores side-effects in function calls (2221) 2221.p4 Front end ✔️
Calling exit in actions after an assignment (2225) 2225.p4 Mid end ✔️
Predication pass leads to unsafe variable assignment (2248a) 2248a.p4 Mid end ✔️
Predication pass leads to unsafe variable assignment (2248b) 2248b.p4 Mid end ✔️
Missed side-effect case StrengthReduction (2287) 2287.p4 Front end ✔️
SideEffectOrdering: Regression? (2288a) 2288a.p4 Front end ✔️
SideEffectOrdering: Regression? (2288b) 2288b.p4 Front end ✔️
MoveInitializers and parser loops (2314) 2314.p4 Front end ✔️
More questions on setInvalid (2323) 2323.p4 Front end
Another issue with Predication (2330) 2330.p4 Mid end ✔️
Another missed case of StrengthReduction (2343) 2343.p4 Front end ✔️
Inlining functions and duplicate table calls (2344) 2344.p4 Mid end ✔️
Incorrect transformation in Predication pass (2345b) 2345b.p4 Mid end ✔️
Follow-up issue on exit statements (2358a) 2358a.p4 Front end ✔️
Follow-up issue on exit statements (2358b) 2358b.p4 Front end ✔️
Def-Use and exit statements (2374) 2374.p4 Front end
InlineActions also seems to handle exit statements incorrectly (2382) 2382.p4 Front end
Clarification question on uninitialized local headers (2383) 2383.p4 Mid end ✔️
Question on comparison to negative constants (2392) 2392.p4 Front end ✔️
Inlining controls with out parameters (2470) 2470.p4 Front end
Side effects in StructInitializers (2488) 2488.p4 Front end ✔️
Follow-up on slice arguments (2498) 2498.p4 Front end ✔️
Side-effect function call in table key (2546b) 2546b.p4 Mid end ✔️
Fix: Predication issue (2564) 2564.p4 Mid end ✔️
Fix: Issue #2004 parser duplicated matches not optimized out (2591) 2591.p4 Mid end ✔️
Predication: Another problem (2613) 2564.p4 Mid end ✔️
🎉 (Bug No 100!) StrengthReduction: Incorrect slice optimization (2614) 2614.p4 Front end ✔️
Some more predication issues (2647) 2647a.p4 Mid end ✔️

BF-P4C Crash Bugs (P4Studio 9.9.0)

Issue Name Compiler Stage Status
1 bug1.p4 Front end
2 bug2.p4 Front end
3 bug3.p4 Back end ⛔ (Front end issue)
4 bug4.p4 Front end
5 bug5.p4 Back end ✔️
6 bug6.p4 Back end ✔️
7 bug7.p4 Back end ✔️
8 bug8.p4 Back end ✔️
9 bug9.p4 Back end ✔️
10 bug10.p4 Back end ✔️
11 bug11.p4 Back end ✔️
12 bug12.p4 Back end
13 bug13.p4 Back end ⛔ (Front end issue)
14 bug14.p4 Back end ✔️
15 bug15.p4 Back end ✔️
16 bug16.p4 Back end ✔️
17 bug17.p4 Back end
18 bug18.p4 Back end ✔️
19 bug19.p4 Back end ✔️
20 bug20.p4 Back end ✔️
21 bug21.p4 Back end ✔️
22 bug22.p4 Back end
23 bug23.p4 Back end
24 bug24.p4 Back end ✔️
25 bug25.p4 Back end ✔️
26 bug26.p4 Back end
27 bug27.p4 Back end ⛔ (Front end issue)
28 bug28.p4 Back end
29 bug29.p4 Back end ⛔ (Front end issue)
30 bug30.p4 Back end ✔️
31 bug31.p4 Back end ✔️
32 bug32.p4 Back end
33 bug33.p4 Back end ✔️
34 bug34.p4 Back end ⛔ (Front end issue)
35 bug35.p4 Back end ✔️

BF-P4C Semantic Bugs (P4Studio 9.9.0)

Issue Name Compiler Stage Status
1 semantic_bug1.p4 Back end ✔️
2 semantic_bug2.p4 Back end ✔️
3 semantic_bug3.p4 Back end ✔️
4 semantic_bug4.p4 Back end ✔️
5 semantic_bug5.p4 Back end ✔️
6 semantic_bug6.p4 Back end
7 semantic_bug7.p4 Back end ✔️
8 semantic_bug8.p4 Back end ✔️
9 semantic_bug9.p4 Back end
10 semantic_bug10.p4 Back end