ppl/sicstus/segmentation violation
ppl_delete_Polyhedron/1 cause "segmentation violation" when using ppl_sicstus. For example, the following query results in segmentation violation: ?- ppl_initialize, A='$VAR'(0), B='$VAR'(1),ppl_new_NNC_Polyhedron_from_constraints([A>B,B>=A],X),ppl_delete_Polyhedron(X). I am running SICStus "3.10.0 (x86-Linux-glibc2.2)" with ppl-0.8. Note that it works fine in other Prolog, e.g., Ciao. any idea what could be the problem ? Thanks. -- Samir
Samir Genaim wrote:
ppl_delete_Polyhedron/1 cause "segmentation violation" when using ppl_sicstus. For example, the following query results in segmentation violation:
?- ppl_initialize, A='$VAR'(0), B='$VAR'(1),ppl_new_NNC_Polyhedron_from_constraints([A>B,B>=A],X),ppl_delete_Polyhedron(X).
I am running SICStus "3.10.0 (x86-Linux-glibc2.2)" with ppl-0.8. Note that it works fine in other Prolog, e.g., Ciao. any idea what could be the problem ?
Dear Samir, I cannot reproduce your problem here: $ ppl_sicstus SICStus 3.12.3 (x86-linux-glibc2.3): Thu Oct 27 17:45:37 CEST 2005 Licensed to math.unipr.it | ?- load_foreign_resource(ppl_sicstus). % loading foreign resource /home/roberto/ppl_sicstus.so in module user yes | ?- ppl_initialize, A='$VAR'(0),B='$VAR'(1),ppl_new_NNC_Polyhedron_from_constraints([A>B,B>=A],X),ppl_delete_Polyhedron(X). A = A, B = B, X = 302544120 ? yes | ?- $ Pat, can you reproduce it? Samir, can you give us more context? On which platform is this happening? Which version of GCC was used to compile the PPL? (You can use the command `ppl-config -E' to answer this question.) What happens if you run ppl_sicstus from withing gdb? You can do something like: $ gdb /usr/local/bin/ppl_sicstus GNU gdb Red Hat Linux (6.3.0.0-1.84rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /usr/local/bin/ppl_sicstus Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0x497000 [Thread debugging using libthread_db enabled] [New Thread -1209006400 (LWP 29360)] SICStus 3.12.3 (x86-linux-glibc2.3): Thu Oct 27 17:45:37 CEST 2005 Licensed to math.unipr.it | ?- Then do things as usual. When the program dies with a segmentaion fault, issue the `info stack' command to gdb and mail the result to this list. Cheers, Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
Samir Genaim wrote:
$ ppl_sicstus
I was running sicstus and not ppl_sicstus, now it works, Thanks !.
Dear Samir, the problem is that it is supposed to work also with sicstus. The difference is that dynamic loading will be used: $ sicstus SICStus 3.12.3 (x86-linux-glibc2.3): Thu Oct 27 17:45:37 CEST 2005 Licensed to math.unipr.it | ?- load_foreign_resource('/usr/local/lib/ppl/ppl_sicstus'). % loading foreign resource /usr/local/lib/ppl/ppl_sicstus.so in module user yes | ?- ppl_initialize, A='$VAR'(0),B='$VAR'(1),ppl_new_NNC_Polyhedron_from_constraints([A>B,B>=A],X),ppl_delete_Polyhedron(X). A = A, B = B, X = 271413168 ? yes | ?- $ If you confirm that dynamic loading is not working for you, then take into account that we are willing to investigate the problem: it may actually be a bug in the PPL! On the other hand, if you prefer not to spend time on ascertaining what is happening, we will understand. All the best, Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it
If you confirm that dynamic loading is not working for you, then take into account that we are willing to investigate the problem:
Dynamic loading is not working for me. The output of 'ppl-config -E' and 'gdb' are enclosed below, please let me know if you need any further debugging information. -- Samir -> ppl-config -E This is the Parma Polyhedra Library (PPL) version 0.8. Copyright (C) 2001-2006 Roberto Bagnara <bagnara@cs.unipr.it>. The PPL is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by the GNU C++ compiler version 4.0.2 20051125 (Red Hat 4.0.2-8). Report bugs to ppl-devel@cs.unipr.it. For the most up-to-date information see the Parma Polyhedra Library site: http://www.cs.unipr.it/ppl/ . -> gdb sicstus GNU gdb Red Hat Linux (6.3.0.0-1.84rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /usr/local/sicstus-3.10.0/bin/sicstus Reading symbols from shared object read from target memory...done. Loaded system supplied DSO at 0xffffe000 [Thread debugging using libthread_db enabled] [New Thread -1209247264 (LWP 16409)] SICStus 3.10.0 (x86-linux-glibc2.2): Tue Dec 17 15:24:21 CET 2002 Licensed to cs.bgu.ac.il | ?- load_foreign_resource('/usr/local/lib/ppl/ppl_sicstus'). % loading foreign resource /usr/local/lib/ppl/ppl_sicstus.so in module user yes | ?- ppl_initialize,A='$VAR'(0),B='$VAR'(1),ppl_new_NNC_Polyhedron_from_constraints([A>B,B>=A],X),ppl_delete_Polyhedron(X). Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1209247264 (LWP 16409)] 0x4367b483 in __gnu_cxx::__pool<true>::_M_reclaim_block () from /usr/lib/libstdc++.so.6 (gdb) info stack #0 0x4367b483 in __gnu_cxx::__pool<true>::_M_reclaim_block () from /usr/lib/libstdc++.so.6 #1 0xb7d2cc56 in ~Polyhedron (this=0x80d0380) at /usr/lib/gcc/i386-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/s tl_vector.h:123 #2 0xb7d0cb19 in ppl_delete_Polyhedron (t_ph=9) at ../ppl_prolog.icc:1761 #3 0xb7ed6a0f in simple_pred_dispatcher (spenv=0xb7ed09c2) at ../foreign.c:855 #4 0x00000008 in ?? () #5 0x00000007 in ?? () #6 0x00000007 in ?? () #7 0xb7d211f8 in sp_stub_ppl_Polyhedron_swap (goal=Variable "goal" is not available.) at sicstus_cfli.ic:277 #8 0x00000009 in ?? () #9 0x00000000 in ?? () (gdb)
participants (2)
-
Roberto Bagnara -
Samir Genaim