|
Hi Thierry I could reproduce the bug (under x86_64/ubuntu with libexpat 2.0.1-7ubuntu3). It seems this lib clobbers registers r12 and r13 which are normally callee-saved registers (and used by gprolog). As you noticed it is possible to recompile libexpat without optimizations options (-O instead of -O2 or try with clang or llvm-gcc). Another workaround consists in compiling gprolog without registers. Configure gprolog with ./configure --disable-regs. This could be OK from version 1.4.1 (soon released). Daniel Le 26/10/2011 23:38, Thierry Martinez a écrit : Hi, Writing a foreign language interface for libexpat, I noticed that calls to Prolog from parser callbacks segfault on GNU/Linux (with GNU Prolog 1.4.0 and 1.3.1) but succeed on Mac OS X. A short example is available athttp://contraintes.inria.fr/~tmartine/tmp/expat_error.tar.gz "make" builds an executable expat_error which prints "here" once then segfaults on GNU/Linux and which prints "here" twice (which is correct) then terminates correctly on Mac OS X. The first "here" is a witness for calls to Prolog outside parser callbacks. The second "here" should be printed by the callback. Thanks, -- Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé. |
_______________________________________________ Bug-prolog mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-prolog
