Commit 0c25245
committed
Fix a use-after-free in MandatoryInlining
In recordDeadFunction, we look at operands of an instruction to be deleted,
and add back the defining instruction of the operands to the worklist.
This works in general when we are deleting dead instructions
recursively.
But we also consider, an instruction with only debug uses as dead. So
when we are deleting a debug instruction, we may have already deleted
its operand's defining instruction. So it would be incorrect to add it
to the worklist.1 parent b43c671 commit 0c25245
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
476 | 489 | | |
477 | 490 | | |
478 | 491 | | |
| |||
0 commit comments