Commit 06b7a70
authored
Fix thread_profile_frames crashing due to uninitialized PC
ZJIT never sets `cfp->jit_return`, so to avoid crashing while
profiling, we need to explicitly validate the PC of the top most frame.
Particularly pertinent for profilers that call rb_profile_frames() from
within a signal handler such as Vernier and Stackprof since they
can sample at any time and observe an invalid PC.1 parent 39d764e commit 06b7a70
1 file changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1761 | 1761 | | |
1762 | 1762 | | |
1763 | 1763 | | |
1764 | | - | |
1765 | | - | |
1766 | | - | |
1767 | | - | |
1768 | | - | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
1769 | 1776 | | |
1770 | 1777 | | |
1771 | 1778 | | |
1772 | | - | |
| 1779 | + | |
1773 | 1780 | | |
1774 | 1781 | | |
1775 | 1782 | | |
| |||
0 commit comments