
Fri, 2002-06-07 19:25, Roberto Bagnara wrote:
in my application (http://www.cs.unipr.it/ppl/) and I observe exactly the same segmentation violations and illegal instructions. May it be because Pl_Exec_Continuation is implemented by means of setjmp/longjmp and I am doing something that is incompatible with them? What can it be?
I hope not to bother anyone telling again that this problem seems very similar to the one I experienced with my applications using GTK. I found that such problems arise when linking code compiled without using frame pointer (like many distribution libraries) and gprolog compiled with all the default optimizations (among them the use of frame pointer). Problems actually appear just with callbacks in the case of GTK so I think your hypothesis could be right. I made some test in gdb discovering a complete mess in the stack after a call from a GTK callback. In some cases I could make things work by modifying manually the stack pointer. I discussed it with Daniel Diaz but I haven't had the time to test it thoroughly as Daniel asked me. My simple solution, so far, is to compile GNUProlog and the "critic" libraries or source-code all in the same way.
Bye, Daniele