Commit d78dfed
Crash handler polish (#4867)
#### Summary
Architectural cleanup and hardening of the Crash Handler.
* Unifies DbgHelp symbol lifecycle by replacing fragmented
`SymInitialize`/`SymCleanup` calls with a shared
`CrashHandler::InitializeSymbolHandler()`.
* Deduplicates WER (Windows Error Reporting) registry setup by moving
canonical ownership entirely to the loader.
* Removes redundant classification and double-logging in
`CCrashDumpWriter::HandleExceptionGlobal`.
* Replaces a dangerous `TerminateThread` call in the watchdog with clean
abandonment to prevent CRT lock deadlocks during shutdown.
#### Motivation
This is a follow-up architectural polish to the recent crash handler
fixes. It resolves technical debt around overlapping symbol management
across `CrashHandler`, `CCrashDumpWriter`, and
`CExceptionInformation_Impl`, centralizes WER setup, and hardens the
shutdown sequence against deadlocks.
#### Test plan
1. Compiled and ran successfully.
2. Verified that MTA launches without regression.
3. **To verify**: Trigger a crash and confirm that `mta/dumps/private`
still correctly populates with dumps, and that `core.log` still
successfully resolves symbols in the stack trace.
#### Checklist
* [x] Your code should follow the [coding
guidelines](https://wiki.multitheftauto.com/index.php?title=Coding_guidelines).
* [x] Smaller pull requests are easier to review. If your pull request
is beefy, your pull request should be reviewable commit-by-commit.1 parent 943266c commit d78dfed
4 files changed
Lines changed: 82 additions & 218 deletions
File tree
- Client/core
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | 285 | | |
300 | 286 | | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | 287 | | |
342 | 288 | | |
343 | 289 | | |
| |||
767 | 713 | | |
768 | 714 | | |
769 | 715 | | |
770 | | - | |
771 | | - | |
772 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
773 | 721 | | |
774 | 722 | | |
775 | 723 | | |
| |||
1475 | 1423 | | |
1476 | 1424 | | |
1477 | 1425 | | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
1490 | | - | |
1491 | | - | |
1492 | 1426 | | |
1493 | 1427 | | |
1494 | 1428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | 132 | | |
186 | 133 | | |
187 | 134 | | |
| |||
214 | 161 | | |
215 | 162 | | |
216 | 163 | | |
217 | | - | |
218 | | - | |
219 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
220 | 169 | | |
221 | 170 | | |
222 | 171 | | |
| |||
0 commit comments