I made a small file that causes a segfault on SWI 9.3.7:
segfault.pl (1.8 KB)
I’m pasting the query and the error below. Note the stack and table limits- smaller limits only give an error but no segfault. The segfault happens when I increase the stack and table limits:
Welcome to SWI-Prolog (threaded, 64 bits, version 9.3.7)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
?- [segfault].
Global stack limit 17,179,869,184
Table space 34,359,738,368
true.
?- between(1,13,_K), findall(J,between(1,_K,J),_Ss), toh(s(_Ss,[],[]),s([],[],_Ss)), format('~w disks: ~w~n',[_K,_Ss]), fail ; true.
1 disks: [1]
2 disks: [1,2]
3 disks: [1,2,3]
4 disks: [1,2,3,4]
5 disks: [1,2,3,4,5]
6 disks: [1,2,3,4,5,6]
7 disks: [1,2,3,4,5,6,7]
8 disks: [1,2,3,4,5,6,7,8]
9 disks: [1,2,3,4,5,6,7,8,9]
10 disks: [1,2,3,4,5,6,7,8,9,10]
11 disks: [1,2,3,4,5,6,7,8,9,10,11]
12 disks: [1,2,3,4,5,6,7,8,9,10,11,12]
ERROR: Received fatal signal 11 (segv)
Time: Wed Jul 24 19:25:47 2024
Inferences: 134392642
Thread: 1 (main)
C-stack trace labeled "crash":
[0] Sset_exception() at ??:? [0x7fee579659bc]
[1] PL_scan_options() at ??:? [0x7fee578e87ca]
[2] __sigaction() at ??:? [0x7fee5760f520]
[3] PL_is_dict() at ??:? [0x7fee57958e8d]
[4] PL_is_dict() at ??:? [0x7fee57958ef1]
[5] PL_is_dict() at ??:? [0x7fee57958ef1]
[6] PL_is_dict() at ??:? [0x7fee57958ef1]
[7] PL_is_dict() at ??:? [0x7fee57958ef1]
[8] PL_is_dict() at ??:? [0x7fee57958ef1]
[9] PL_is_dict() at ??:? [0x7fee57958ef1]
[10] PL_is_dict() at ??:? [0x7fee57958ef1]
[11] PL_is_dict() at ??:? [0x7fee57958ef1]
[12] PL_is_dict() at ??:? [0x7fee57958ef1]
[13] PL_is_dict() at ??:? [0x7fee57958ef1]
[14] PL_is_dict() at ??:? [0x7fee57958ef1]
[15] PL_is_dict() at ??:? [0x7fee57958ef1]
[16] PL_is_dict() at ??:? [0x7fee57958ef1]
[17] PL_is_dict() at ??:? [0x7fee57958ef1]
[18] PL_is_dict() at ??:? [0x7fee57958ef1]
[19] PL_is_dict() at ??:? [0x7fee57958ef1]
[20] PL_is_dict() at ??:? [0x7fee57958ef1]
[21] PL_is_dict() at ??:? [0x7fee57958ef1]
[22] PL_is_dict() at ??:? [0x7fee57958ef1]
[23] PL_is_dict() at ??:? [0x7fee57958ef1]
[24] PL_is_dict() at ??:? [0x7fee57958ef1]
[25] PL_is_dict() at ??:? [0x7fee57958ef1]
[26] PL_is_dict() at ??:? [0x7fee57958ef1]
[27] PL_is_dict() at ??:? [0x7fee57958ef1]
[28] PL_is_dict() at ??:? [0x7fee57958ef1]
[29] PL_is_dict() at ??:? [0x7fee57958ef1]
[30] PL_is_dict() at ??:? [0x7fee57958ef1]
[31] PL_is_dict() at ??:? [0x7fee57958ef1]
[32] PL_is_dict() at ??:? [0x7fee57958ef1]
[33] PL_is_dict() at ??:? [0x7fee57958ef1]
[34] PL_is_dict() at ??:? [0x7fee57958ef1]
[35] PL_is_dict() at ??:? [0x7fee57958ef1]
[36] PL_is_dict() at ??:? [0x7fee57958ef1]
[37] PL_is_dict() at ??:? [0x7fee57958ef1]
[38] PL_is_dict() at ??:? [0x7fee57958ef1]
[39] PL_is_dict() at ??:? [0x7fee57958ef1]
[40] PL_is_dict() at ??:? [0x7fee57958ef1]
[41] PL_is_dict() at ??:? [0x7fee57958ef1]
[42] PL_is_dict() at ??:? [0x7fee57958ef1]
[43] PL_is_dict() at ??:? [0x7fee57958ef1]
[44] PL_is_dict() at ??:? [0x7fee57958ef1]
[45] PL_is_dict() at ??:? [0x7fee57958ef1]
[46] PL_is_dict() at ??:? [0x7fee57958ef1]
[47] PL_is_dict() at ??:? [0x7fee57958ef1]
[48] PL_is_dict() at ??:? [0x7fee57958ef1]
[49] PL_is_dict() at ??:? [0x7fee57958ef1]
[50] PL_is_dict() at ??:? [0x7fee57958ef1]
[51] PL_is_dict() at ??:? [0x7fee57958ef1]
[52] PL_is_dict() at ??:? [0x7fee57958ef1]
[53] PL_is_dict() at ??:? [0x7fee57958ef1]
[54] PL_is_dict() at ??:? [0x7fee57958ef1]
[55] PL_is_dict() at ??:? [0x7fee57958ef1]
[56] PL_is_dict() at ??:? [0x7fee57958ef1]
[57] PL_is_dict() at ??:? [0x7fee57958ef1]
[58] PL_is_dict() at ??:? [0x7fee57958ef1]
[59] PL_is_dict() at ??:? [0x7fee57958ef1]
[60] PL_is_dict() at ??:? [0x7fee57958ef1]
[61] PL_is_dict() at ??:? [0x7fee57958ef1]
[62] PL_is_dict() at ??:? [0x7fee57958ef1]
[63] PL_is_dict() at ??:? [0x7fee57958ef1]
[64] PL_is_dict() at ??:? [0x7fee57958ef1]
[65] PL_is_dict() at ??:? [0x7fee57958ef1]
[66] PL_is_dict() at ??:? [0x7fee57958ef1]
[67] PL_is_dict() at ??:? [0x7fee57958ef1]
[68] PL_is_dict() at ??:? [0x7fee57958ef1]
[69] PL_is_dict() at ??:? [0x7fee57958ef1]
[70] PL_is_dict() at ??:? [0x7fee57958ef1]
[71] PL_is_dict() at ??:? [0x7fee57958ef1]
[72] PL_is_dict() at ??:? [0x7fee57958ef1]
[73] PL_is_dict() at ??:? [0x7fee57958ef1]
[74] PL_is_dict() at ??:? [0x7fee57958ef1]
[75] PL_is_dict() at ??:? [0x7fee57958ef1]
[76] PL_is_dict() at ??:? [0x7fee57958ef1]
[77] PL_is_dict() at ??:? [0x7fee57958ef1]
[78] PL_is_dict() at ??:? [0x7fee57958ef1]
[79] PL_is_dict() at ??:? [0x7fee57958ef1]
[80] PL_is_dict() at ??:? [0x7fee57958ef1]
[81] PL_is_dict() at ??:? [0x7fee57958ef1]
[82] PL_is_dict() at ??:? [0x7fee57958ef1]
[83] PL_is_dict() at ??:? [0x7fee57958ef1]
[84] PL_is_dict() at ??:? [0x7fee57958ef1]
[85] PL_is_dict() at ??:? [0x7fee57958ef1]
[86] PL_is_dict() at ??:? [0x7fee57958ef1]
[87] PL_is_dict() at ??:? [0x7fee57958ef1]
[88] PL_is_dict() at ??:? [0x7fee57958ef1]
[89] PL_is_dict() at ??:? [0x7fee57958ef1]
[90] PL_is_dict() at ??:? [0x7fee57958ef1]
[91] PL_is_dict() at ??:? [0x7fee57958ef1]
[92] PL_is_dict() at ??:? [0x7fee57958ef1]
[93] PL_is_dict() at ??:? [0x7fee57958ef1]
[94] PL_is_dict() at ??:? [0x7fee57958ef1]
[95] PL_is_dict() at ??:? [0x7fee57958ef1]
[96] PL_is_dict() at ??:? [0x7fee57958ef1]
[97] PL_is_dict() at ??:? [0x7fee57958ef1]
[98] PL_is_dict() at ??:? [0x7fee57958ef1]
[99] PL_is_dict() at ??:? [0x7fee57958ef1]
PROLOG STACK:
Segmentation fault
This is windows WSL running Ubuntu 22.04 Jammy.
But note that this time I got a crash (without output) with version 9.3.0 also (on Windows), so I don’t think it’s got to do with the version after all.