Commit 12bbcbc
Harden compiler-error display against disposed LLVM modules (#854)
InvalidIRError retained a live LLVM.Instruction (from check_ir_values), so
showing a caught error after its module was disposed segfaulted in
Value::getName (e.g. Test rendering a failed test's exception). Snapshot the
instruction to a string at construction, and route `show` through `showerror`
for InvalidIRError/KernelError so display never field-dumps internal IR refs.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent e107287 commit 12bbcbc
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
| |||
365 | 368 | | |
366 | 369 | | |
367 | 370 | | |
368 | | - | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
369 | 374 | | |
370 | 375 | | |
371 | 376 | | |
| |||
0 commit comments