Commit 43fd0e6
committed
fix(detector): uExceptionTooGeneral skippt legit Top-Level-Handler (SCA078 ~40 FPs)
CLI-Runner und Worker-Threads brauchen einen breiten Top-Level-Catch um
Crashes in saubere Error-Messages zu uebersetzen statt das Programm hart
abstuerzen zu lassen. Self-Test fand davon 40+ in uConsoleRunner,
uStaticAnalyzer2, uIDEAnalyseRunner.
Pattern (legitim):
except
on E: Exception do
begin
WriteLn(ErrOutput, 'Fatal: ', E.Message);
Exit(Integer(cecToolError));
end;
end;
Neue Heuristik IsLegitTopLevelHandler walked den nkOnHandler-Subtree und
prueft auf gleichzeitige Praesenz von:
* LOG-Pattern (WriteLn / Write / Log* / OutputDebug* / ShowMessage)
* LEAVE-Pattern (Halt / Exit / raise)
Wenn beide -> kein Swallow, sondern saubere Crash-Translation, kein
Finding. Schmal genug um die echten 'except on E: Exception do log(E)'
ohne Exit weiterhin zu treffen (klassisches Swallow).1 parent afd43b6 commit 43fd0e6
1 file changed
Lines changed: 72 additions & 0 deletions
Lines changed: 72 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
| |||
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
62 | 133 | | |
63 | 134 | | |
64 | 135 | | |
| |||
71 | 142 | | |
72 | 143 | | |
73 | 144 | | |
| 145 | + | |
74 | 146 | | |
75 | 147 | | |
76 | 148 | | |
| |||
0 commit comments