An issue in "make check" for SWI prolog under Debina (lenny)

Hello everyone,
I've compiled PPL 0.9 under Debian (lenny) on a Pentium III, with SICStus 3.12.8 and SWIprolog 5.6.58 installed. Compilation gives no errors. Before installing I executed "make check" which returns the following error (I'll attach below the entire output)
*** glibc detected *** ./ppl_pl: realloc(): invalid pointer: 0x081524dc ***
The "make install" succeeds but then I have the following behavior:
$ ppl_pl Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 5.6.58) Copyright (c) 1990-2008 University of Amsterdam. SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- halt. Segmentation fault $
This does not happen under SICStus
$ ppl_sicstus SICStus 3.12.8 (x86-linux-glibc2.3): Tue May 8 13:30:29 CEST 2007 Licensed to uniroma2.it | ?- halt. $
I've had the chance of testing some base functionalities (such as creation/deletion of polyhedra) and these work correctly. I would like to know if my installation is sound or do I have to solve this "check" problem in order to have the library installed correctly?
I have one more brief question. If I issue a request "ppl_Polyhedron_get_constraints(H,C)" and the handler H is "random" (in particular, it was never returned by the system) in SWI I have the following error:
ERROR: ppl_Polyhedron_get_constraints/2: Caught signal 11 (segv)
and in SICStus I have:
! segmentation violation % Execution aborted
I understand that it is quite strange that a user "creates" handlers out of nowhere. Just wanted to make sure that this "segmentation violation" is expected.
Thank you very much for any help
Valerio Senni
% -------------------- ATTACHMENT -------------------- ~/libppl-0.9/interfaces/Prolog/SWI$ make check make pl_clpq pl_clpq2 make[1]: Entering directory `/home/valerio/libppl-0.9/interfaces/Prolog/SWI' make[1]: `pl_clpq' is up to date. make[1]: `pl_clpq2' is up to date. make[1]: Leaving directory `/home/valerio/libppl-0.9/interfaces/Prolog/SWI' make check-local make[1]: Entering directory `/home/valerio/libppl-0.9/interfaces/Prolog/SWI' if [ . != `pwd` ]; then \ cp -f ./../tests/pl_check.pl . ; \ fi ;\ echo "ensure_loaded('./swi_pl_check'). main." > script_pchk /bin/sh ../../../libtool --mode=execute \ -dlopen ../../../src/libppl.la \ -dlopen ../../../Watchdog/src/libpwl.la \ ./ppl_pl < script_pchk Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 5.6.58) Copyright (c) 1990-2008 University of Amsterdam. SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
Warning: /home/valerio/libppl-0.9/interfaces/Prolog/SWI/pl_check.pl:2551: Singleton-marked variables appearing more than once: [_X] % pl_check.pl compiled 0.05 sec, 146,192 bytes % ./swi_pl_check compiled 0.05 sec, 147,992 bytes true.
*** glibc detected *** ./ppl_pl: realloc(): invalid pointer: 0x081524dc *** ======= Backtrace: ========= /lib/i686/cmov/libc.so.6[0x403114f4] /lib/i686/cmov/libc.so.6(realloc+0x242)[0x40315b52] ./ppl_pl[0x8121b88] /usr/local/lib/libgmp.so.3(__gmpz_realloc+0x56)[0x400e6176] ======= Memory map: ======== 08048000-0814a000 r-xp 00000000 03:05 214940 /home/valerio/libppl-0.9/interfaces/Prolog/SWI/ppl_pl 0814a000-0814e000 rw-p 00101000 03:05 214940 /home/valerio/libppl-0.9/interfaces/Prolog/SWI/ppl_pl 0814e000-08223000 rw-p 0814e000 00:00 0 [heap] 40000000-4001a000 r-xp 00000000 03:01 280602 /lib/ld-2.7.so 4001a000-4001c000 rw-p 0001a000 03:01 280602 /lib/ld-2.7.so 4001c000-4001d000 r-xp 4001c000 00:00 0 [vdso] 4001d000-4001f000 rw-p 4001d000 00:00 0 4001f000-400b2000 r-xp 00000000 03:05 214875 /home/valerio/libppl-0.9/src/.libs/libppl.so.6.0.0 400b2000-400b4000 rw-p 00092000 03:05 214875 /home/valerio/libppl-0.9/src/.libs/libppl.so.6.0.0 400b4000-400b8000 r-xp 00000000 03:05 214908 /home/valerio/libppl-0.9/Watchdog/src/.libs/libpwl.so.3.0.0 400b8000-400b9000 rw-p 00003000 03:05 214908 /home/valerio/libppl-0.9/Watchdog/src/.libs/libpwl.so.3.0.0 400b9000-400c0000 r--s 00000000 03:01 340151 /usr/lib/gconv/gconv-modules.cache 400c7000-400cb000 r-xp 00000000 03:01 35353 /usr/local/lib/libgmpxx.so.4.0.4 400cb000-400cc000 rw-p 00003000 03:01 35353 /usr/local/lib/libgmpxx.so.4.0.4 400cc000-40102000 r-xp 00000000 03:01 35349 /usr/local/lib/libgmp.so.3.4.4 40102000-40103000 rw-p 00035000 03:01 35349 /usr/local/lib/libgmp.so.3.4.4 40103000-4010a000 r-xp 00000000 03:01 84554 /lib/i686/cmov/librt-2.7.so 4010a000-4010c000 rw-p 00006000 03:01 84554 /lib/i686/cmov/librt-2.7.so 4010c000-40137000 r-xp 00000000 03:01 48663 /lib/libreadline.so.5.2 40137000-4013b000 rw-p 0002a000 03:01 48663 /lib/libreadline.so.5.2 4013b000-4013d000 rw-p 4013b000 00:00 0 4013d000-4016c000 r-xp 00000000 03:01 280553 /lib/libncurses.so.5.6 4016c000-4016f000 rw-p 0002f000 03:01 280553 /lib/libncurses.so.5.6 4016f000-40193000 r-xp 00000000 03:01 84542 /lib/i686/cmov/libm-2.7.so 40193000-40195000 rw-p 00023000 03:01 84542 /lib/i686/cmov/libm-2.7.so 40195000-40197000 r-xp 00000000 03:01 84541 /lib/i686/cmov/libdl-2.7.so 40197000-40199000 rw-p 00001000 03:01 84541 /lib/i686/cmov/libdl-2.7.so 40199000-40273000 r-xp 00000000 03:01 17506 /usr/lib/libstdc++.so.6.0.8 40273000-40276000 r--p 000d9000 03:01 17506 /usr/lib/libstdc++.so.6.0.8 40276000-40278000 rw-p 000dc000 03:01 17506 /usr/lib/libstdc++.so.6.0.8 40278000-4027e000 rw-p 40278000 00:00 0 4027e000-40288000 r-xp 00000000 03:01 48589 /lib/libgcc_s.so.1 40288000-40289000 rw-p 00009000 03:01 48589 /lib/libgcc_s.so.1 40289000-4029e000 r-xp 00000000 03:01 84552 /lib/i686/cmov/ libpthread-2.7.so 4029e000-402a0000 rw-p 00014000 03:01 84552 /lib/i686/cmov/ libpthread-2.7.so 402a0000-402a3000 rw-p 402a0000 00:00 0 402a3000-403f8000 r-xp 00000000 03:01 84538 /lib/i686/cmov/libc-2.7.so 403f8000-403f9000 r--p 00155000 03:01 84538 /lib/i686/cmov/libc-2.7.so 403f9000-403fb000 rw-p 00156000 03:01 84538 /lib/i686/cmov/libc-2.7.so 403fb000-403ff000 rw-p 403fb000 00:00 0 403ff000-40539000 r--p 00000000 03:01 32413 /usr/lib/locale/locale-archive 40539000-40769000 r--s 00000000 03:05 214940 /home/valerio/libppl-0.9/interfaces/Prolog/SWI/ppl_pl 40769000-40771000 rw-p 40769000 00:00 0 40771000-42769000 ---p 40771000 00:00 0 42769000-4276d000 rw-p 42769000 00:00 0 4276d000-42865000 ---p 4276d000 00:00 0 42865000-4287d000 rw-p 42865000 00:00 0 4287d000-44865000 ---p 4287d000 00:00 0 44865000-44869000 rw-p 44865000 00:00 0 44869000-45865000 ---p 44869000 00:00 0 bf9fd000-bfa13000 rw-p bf9fd000 00:00 0 [stack] /bin/sh: line 3: 3997 Aborted /bin/sh ../../../libtool --mode=execute -dlopen ../../../src/libppl.la -dlopen ../../../Watchdog/src/ libpwl.la ./ppl_pl <script_pchk make[1]: *** [pl_check_test] Error 134 make[1]: Leaving directory `/home/valerio/libppl-0.9/interfaces/Prolog/SWI' make: *** [check-am] Error 2

Valerio Senni wrote:
Hello everyone,
I've compiled PPL 0.9 under Debian (lenny) on a Pentium III, with SICStus 3.12.8 and SWIprolog 5.6.58 installed. Compilation gives no errors. Before installing I executed "make check" which returns the following error (I'll attach below the entire output)
*** glibc detected *** ./ppl_pl: realloc(): invalid pointer: 0x081524dc ***
The "make install" succeeds but then I have the following behavior:
$ ppl_pl Welcome to SWI-Prolog (Multi-threaded, 32 bits, Version 5.6.58) Copyright (c) 1990-2008 University of Amsterdam. SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- halt. Segmentation fault $
This does not happen under SICStus
$ ppl_sicstus SICStus 3.12.8 (x86-linux-glibc2.3): Tue May 8 13:30:29 CEST 2007 Licensed to uniroma2.it | ?- halt. $
I've had the chance of testing some base functionalities (such as creation/deletion of polyhedra) and these work correctly. I would like to know if my installation is sound or do I have to solve this "check" problem in order to have the library installed correctly?
Dear Valerio,
you can only trust the library if `make check' succeeds. What you report is strange, also because we use the SWI-Prolog interface ourselves on a couple of projects, and never had any problems.
However, given that PPL 0.10 will be out in at most a couple of weeks from now, I think it is best for you to try a snapshot of that release. You will find it at
ftp://ftp.cs.unipr.it/pub/ppl/snapshots/
Try it, and if `make check' still fails we will investigate further.
I have one more brief question. If I issue a request "ppl_Polyhedron_get_constraints(H,C)" and the handler H is "random" (in particular, it was never returned by the system) in SWI I have the following error:
ERROR: ppl_Polyhedron_get_constraints/2: Caught signal 11 (segv)
and in SICStus I have:
! segmentation violation % Execution aborted
I understand that it is quite strange that a user "creates" handlers out of nowhere. Just wanted to make sure that this "segmentation violation" is expected.
If you obtained the value of H from the PPL and you did not invalidate the handler (e.g., by invoking a ppl_delete... predicate over it), then the segmentation violation (a.k.a. segv, a.k.a. signal 11) must not happen. In all other cases it can happen (actually, in all other cases even worse things can happen). Please do not hesitate to come back to us in case I was not clear. All the best,
Roberto
participants (2)
-
Roberto Bagnara
-
Valerio Senni