Commit b2edc35
Fix signal crash during keyword argument call
64f508a changed rb_threadptr_raise to call rb_exception_setup,
which uses rb_scan_args with RB_SCAN_ARGS_PASS_CALLED_KEYWORDS.
This checked rb_keyword_given_p(), which read the interrupted
frame's keyword state rather than the signal raise arguments,
causing a crash when a signal arrived during a keyword call.
Revert rb_threadptr_raise to use rb_make_exception directly, and
have thread_raise_m call rb_exception_setup where
rb_keyword_given_p() reflects the correct frame.
[Bug #21865]1 parent e04267a commit b2edc35
2 files changed
+32
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
353 | 367 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2737 | 2737 | | |
2738 | 2738 | | |
2739 | 2739 | | |
| 2740 | + | |
| 2741 | + | |
2740 | 2742 | | |
2741 | 2743 | | |
2742 | 2744 | | |
2743 | 2745 | | |
2744 | | - | |
| 2746 | + | |
| 2747 | + | |
| 2748 | + | |
| 2749 | + | |
| 2750 | + | |
| 2751 | + | |
2745 | 2752 | | |
2746 | 2753 | | |
2747 | 2754 | | |
2748 | 2755 | | |
2749 | 2756 | | |
2750 | 2757 | | |
2751 | 2758 | | |
2752 | | - | |
| 2759 | + | |
| 2760 | + | |
2753 | 2761 | | |
2754 | 2762 | | |
2755 | 2763 | | |
| |||
2933 | 2941 | | |
2934 | 2942 | | |
2935 | 2943 | | |
2936 | | - | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
2937 | 2952 | | |
2938 | 2953 | | |
2939 | 2954 | | |
| |||
0 commit comments