There are three files in the zip file. Put them all in the same directory. Load xsb_bug_mem_err.P and issue the queries indicated at the end of the file. You will see the memory error. Restart XSB and load xsb_bug_res_err.P. Issue queries indicated at the end of the file and you will see the incorrect answer.
The above was tested for XSB 3.2 under both Ubuntu and Mac OS X.