Skip to content

Commit

Permalink
fix custom signal handling, which was broken after #166
Browse files Browse the repository at this point in the history
There was a typo in #181: when the pari sigint handling was converted
to a general mechanism, the line

```
    PARI_SIGINT_pending = 0;
```

got translated into

```
    custom_signal_unblock();
```
instead of the correct
```
    custom_set_pending_signal(0);
```

This error didn't take effect until #166 removed the pari sigint
handling.

This causes some doctest failures in sagemath:
```
src/sage/coding/linear_code.py
src/sage/geometry/integral_points.pxi
src/sage/rings/integer.pyx
src/sage/rings/polynomial/polynomial_element.pyx
```
related to mishandling of AlarmInterrupt.

See: https://github.com/sagemath/cysignals/pull/181/files#r1904885037
  • Loading branch information
tornaria authored and dimpase committed Jan 14, 2025
1 parent e26017e commit db7ad33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cysignals/implementation.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ static void _sig_on_interrupt_received(void)
do_raise_exception(cysigs.interrupt_received);
cysigs.sig_on_count = 0;
cysigs.interrupt_received = 0;
custom_signal_unblock();
custom_set_pending_signal(0);

#if HAVE_SIGPROCMASK
sigprocmask(SIG_SETMASK, &oldset, NULL);
Expand Down

0 comments on commit db7ad33

Please sign in to comment.