From: SourceForge.net <no...@so...> - 2006-06-16 13:29:36
|
Bugs item #1506704, was opened at 2006-06-15 14:37 Message generated for change (Comment added) made by tswift You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101176&aid=1506704&group_id=1176 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Other Group: wrong answer Status: Open Resolution: None Priority: 5 Submitted By: Florin Mihaila (fmihaila) Assigned to: Nobody/Anonymous (nobody) Summary: Abnormal globalvar/2 behaviour Initial Comment: This morning I've checked out XSB fresh from CVS. I know it's the latest version, because I got the changes in emu/emuloop.c committed by dwarren at 1:19am today. I've built it on Mac OS X/PowerPC and Linux/x86, with and without multi-threading and debug support, yielding 4 configurations on each platform. Attempting to build on Linux/x86 with the default configure flags ended in a memory violation while compiling ora_call.P (bug 1506690). On each of the remaining 7 configurations, I get the following abnormal globalvar/2 behaviour: | ?- [globalvar]. [globalvar loaded] yes | ?- globalvar(a,1). yes | ?- globalvar(a,1), globalvar(b,2). no As I understand it, the last query should succeed. Can anyone else confirm this behaviour? --Florin ---------------------------------------------------------------------- >Comment By: Terrance Swift (tswift) Date: 2006-06-16 13:29 Message: Logged In: YES user_id=13011 I dont have time to debug today -- but I dont understand the builtin globalvar/1 -- why does it use glstack.low rather than hreg? Terry ---------------------------------------------------------------------- Comment By: Florin Mihaila (fmihaila) Date: 2006-06-15 19:23 Message: Logged In: YES user_id=1435655 globalvar.P changed on 2005/07/04 13:08:31, from revision 1.3 to 1.4. If I use globalvar.P r1.3 in today's build (in a fresh session), it works. If I use r1.4, it fails. ---------------------------------------------------------------------- Comment By: David S. Warren (dwarren) Date: 2006-06-15 15:08 Message: Logged In: YES user_id=13069 It should succeed. I tried it and got the incorrect behavior you show. I turned on tracing to see what was happening, and after a few false starts, I finally traced it all the way through and it succeeded as it should. So I got out of XSB and retried it from scratch, and it then worked correctly without tracing. Now I can't get it to show the bad behavior, either under cygwin (gcc) or under MSVC. So I'm at a bit of a loss. It probably has to do with set_arg, which can be quite sensitive. I changed set_arg(A,B,C), to term_set_arg(A,B,C,0) and it still works. Since I can no longer reproduce it, I'm not quite what to do now... -David ---------------------------------------------------------------------- Comment By: Florin Mihaila (fmihaila) Date: 2006-06-15 14:51 Message: Logged In: YES user_id=1435655 I just tried it on the 8th remaining configuration, namely linux/x86 with the default configure flags, and I am getting the same wrong answer. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101176&aid=1506704&group_id=1176 |