trealla-prolog / trealla

A compact, efficient Prolog interpreter written in plain-old C.
MIT License
274 stars 13 forks source link

GSL: wrong sized matrix segfault #566

Closed flexoron closed 4 months ago

flexoron commented 4 months ago

$ cat /etc/os-release PRETTY_NAME="Ubuntu 24.04 LTS"

Trealla 2.53.45

$ cat samples/test_matrix_det.mat
#01,1x-1,0.0
-1.0
#det=-1.0

$ tpl samples/test_matrix_det.pl
?- gsl_set_error_handler_off(_).
   true.
?- main.
Segmentation fault (core dumped)

*****
$ gdb tpl
Reading symbols from tpl...
(gdb) run
?- ['samples/test_matrix_det.pl'].
   true.
?- gsl_set_error_handler_off(_).
   true.
?- main.
Program received signal SIGSEGV, Segmentation fault.
0x0000555555669892 in bif_sys_gsl_matrix_read_2 (q=0x555555d05230)
    at src/bif_streams.c:7127
7127        for (unsigned i = 0; i < m->size1; i++) {
: 
(gdb)