I encounter different behaviour on abort

I’m using: SWI-Prolog version threaded, 64 bits, version 9.2.2

I have the code:

combine_01_fast( LENGTH, LIST) :- LENGTH = 0, LIST = [], !.
combine_01_fast( LENGTH, LIST) :- true % LENGTH \== 0, LIST \== []
, LEN2 is LENGTH - 1
, LIST = [H|T]
, member( H, [ 0, 1])
, combine_01_fast( LEN2, T)
.

combine_01_fast_safe( LENGTH, LIST) :- length( LIST, LENGTH), combine_01_fast( LENGTH, LIST).

When I call the code:

?- TERM= combine_01_fast_safe( LEN, L), TERM, writeln( TERM), false.

Then I get:

combine_01_fast_safe(16,[1,0,0,1,1,0,0,1,0,1,1,1,0,0,0,0])
^C
Action (h for help) ? abort
% Execution Aborted

?- 

or I land in the shell:

combine_01_fast_safe(15,[1,0,1,1,0,0,0,1,1,0,0,1,1,1,1])
^C
Action (h for help) ? abort
ox@debian64 2025-01-13 14:12:38:
~/dev-git/cnf_enumeration/swipl
(ins)$ 

I have no clue when it decides to end the prolog interpreter and when not.

Thanks in advance.

Seems similar to ctrl-C in read causes exit from REPL · Issue #1097 · SWI-Prolog/swipl-devel · GitHub. But this indeed still reproduces in the latest version, so either the fix is incomplete or the cause is different.

After ^C I am in the debug mode and after pressing ‘a’ I land either in the prolog repl or it exits.

Should be fixed with FIXED: Control-C + abort while printing output may exit REPL. · SWI-Prolog/swipl-devel@08ca2bf · GitHub