When having the attached in the working directory, executing XSB in the following manner results in a runtime error. The error occurs nondeterministically; sometimes the program exits normally, sometimes it results in an error.
xsb -S -e "[basics], load_dyn('jjansen_xsb.P'), x269(X0, X1, X2, X3)."
The produced output when an error occurs is the following:
[joachim@thither ~/sandbox]$ xsb -S -e "[basics], load_dyn('jjansen_xsb.P'), x269(X0, X1, X2, X3)." [xsb_configuration loaded] [sysinitrc loaded] [xsbbrat loaded] XSB Version 3.7. (Clan MacGregor) of July 6, 2016 [x86_64-unknown-linux-gnu 64 bits; mode: optimal; engine: slg-wam; scheduling: local] [Build date: 2017-05-02] Evaluating command line goal: | ?- [basics], load_dyn('xsb.P'), x269(X0, X1, X2, X3). | ?- [basics loaded] [/home/joachim/sandbox/xsb.P dynamically loaded, cpu time used: 0.5680 seconds] Partial Forward Continuation... ... call_c/1 From /home/joachim/software/idp3_release/bin/xsb-3.7./syslib/standard.xwam ... call_c/1 From /home/joachim/software/idp3_release/bin/xsb-3.7./syslib/standard.xwam ++Error[XSB]: [Runtime/C] ++Memory violation occurred during evaluation. ++Please report this problem using the XSB bug tracking system accessible from ++ http://sourceforge.net/projects/xsb ++Please supply the steps necessary to reproduce the bug. ++Error[XSB]: [Runtime/C] Exiting XSB abnormally...
Running with a debug executable of XSB simply results in a segfault.