Commit 76642c7
authored
[semanticcpg] Catch and warn about failed method expansion. (#5891)
Some frontends generate invalid CPGs which lets the CFG node to METHOD
expansion fail which results in an exception. In the passed we already
handled this by returning null instead. We now return to this because
using code checks for null in relevant places but does not handle
exceptions and we do not feel comfortable releasing this without
observing the logs for a while longer.
There is also at least c2cpg which has a known CPG format issue for
which we cannot release a fix to production. So this handling here will
stay for a while.1 parent 02ad1c1 commit 76642c7
File tree
1 file changed
+16
-2
lines changed- semanticcpg/src/main/scala/io/shiftleft/semanticcpg/language/nodemethods
1 file changed
+16
-2
lines changedLines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
8 | 14 | | |
9 | 15 | | |
10 | 16 | | |
| |||
107 | 113 | | |
108 | 114 | | |
109 | 115 | | |
110 | | - | |
111 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
112 | 126 | | |
113 | 127 | | |
114 | 128 | | |
| |||
0 commit comments