From richard at ccpgames.com Fri May 5 13:57:59 2006 From: richard at ccpgames.com (Richard) Date: Fri, 5 May 2006 11:57:59 -0000 Subject: [Stackless-checkins] Checkin messages soon hopefully Message-ID: <129CEF95A523704B9D46959C922A28000187AC4B@nemesis.central.ccp.cc> Sorry for the spam if these are getting through. I am trying just working up to getting this ready for the SVN checkins sent to it. If you want to see them in the meantime, you can subscribe to the python-checkins mailing list and filter the stackless ones out of it. _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From richard.m.tew at gmail.com Fri May 5 09:31:10 2006 From: richard.m.tew at gmail.com (Richard Tew) Date: Fri, 5 May 2006 07:31:10 +0000 Subject: [Stackless-checkins] Test 2 Message-ID: <952d92df0605050031g39e4b9c2vea5b476449a03169@mail.gmail.com> This is another test. _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From richard.m.tew at gmail.com Fri May 5 09:19:32 2006 From: richard.m.tew at gmail.com (Richard Tew) Date: Fri, 5 May 2006 07:19:32 +0000 Subject: [Stackless-checkins] Test Message-ID: <952d92df0605050019p694905d9u983f2aa5d3ea10f2@mail.gmail.com> Test whether this list is working! _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From mailman-bounces at stackless.com Fri May 5 06:46:55 2006 From: mailman-bounces at stackless.com (mailman-bounces at stackless.com) Date: Fri, 05 May 2006 06:46:55 +0200 Subject: Stackless-checkins subscription notification Message-ID: Richard Tew has been successfully subscribed to Stackless-checkins. From python-checkins at python.org Tue May 16 15:37:23 2006 From: python-checkins at python.org (richard.tew) Date: Tue, 16 May 2006 15:37:23 +0200 (CEST) Subject: [Stackless-checkins] r46013 - in stackless/Python-2.4.3/dev: Python/ceval.c Stackless/stackless_version.h Message-ID: <20060516133723.ABDCD1E4007@bag.python.org> Author: richard.tew Date: Tue May 16 15:37:23 2006 New Revision: 46013 Modified: stackless/Python-2.4.3/dev/Python/ceval.c stackless/Python-2.4.3/dev/Stackless/stackless_version.h Log: Fixed a bug with too deep recursion and bumped the Stackless version for a binary release. Modified: stackless/Python-2.4.3/dev/Python/ceval.c ============================================================================== --- stackless/Python-2.4.3/dev/Python/ceval.c (original) +++ stackless/Python-2.4.3/dev/Python/ceval.c Tue May 16 15:37:23 2006 @@ -703,11 +703,19 @@ #ifdef STACKLESS if (CSTACK_SAVE_NOW(tstate, f)) return slp_eval_frame_newstack(f, retval); -#endif /* STACKLESS */ /* push frame */ + if (Py_EnterRecursiveCall("")) { + Py_XDECREF(retval); + tstate->frame = f->f_back; + Py_DECREF(f); + return NULL; + } +#else + /* push frame */ if (Py_EnterRecursiveCall("")) return NULL; +#endif /* STACKLESS */ tstate->frame = f; Modified: stackless/Python-2.4.3/dev/Stackless/stackless_version.h ============================================================================== --- stackless/Python-2.4.3/dev/Stackless/stackless_version.h (original) +++ stackless/Python-2.4.3/dev/Stackless/stackless_version.h Tue May 16 15:37:23 2006 @@ -1,7 +1,7 @@ /* * Stackless Python version string - * created at Thu May 04 18:28:57 2006 by mkversion.py + * created at Tue May 16 13:27:25 2006 by mkversion.py */ /* keep this entry up-to-date */ -#define STACKLESS_VERSION "3.1b3 060504" +#define STACKLESS_VERSION "3.1b3 060516" _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From python-checkins at python.org Sun May 7 09:58:00 2006 From: python-checkins at python.org (richard.tew) Date: Sun, 7 May 2006 09:58:00 +0200 (CEST) Subject: [Stackless-checkins] r45930 - stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py Message-ID: <20060507075800.7B3781E400A@bag.python.org> Author: richard.tew Date: Sun May 7 09:57:59 2006 New Revision: 45930 Modified: stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py Log: Updated the dictionary pickling tests to cover all three types of iterator. Modified: stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py ============================================================================== --- stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py (original) +++ stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py Sun May 7 09:57:59 2006 @@ -50,12 +50,30 @@ schedule() return i -def dicttest(n, when): - for i in {}.fromkeys(range(n)): +def dicttestiterkeys(n, when): + for i in dict([ (i, i) for i in range(n) ]).iterkeys(): if i == when: schedule() return n +def dicttestitervalues(n, when): + for i in dict([ (i, i) for i in range(n) ]).itervalues(): + if i == when: + schedule() + return n + +def dicttestiteritems(n, when): + for (i, j) in dict([ (i, i) for i in range(n) ]).iteritems(): + if i == when: + schedule() + return n + +def settest(n, when): + for i in set(range(n)): + if i == when: + schedule() + return i + def tupletest(n, when): for i in tuple(range(n)): if i == when: @@ -101,7 +119,7 @@ # clear out old errors reset() - + if self.verbose: print "starting tasklet" t.run() @@ -116,7 +134,7 @@ # if self.verbose: print repr(pi) # why do we want to remove it? # t.remove() - + if self.verbose: print "unpickling" ip = pickle.loads(pi) @@ -162,9 +180,23 @@ def testRecursive(self): self.run_pickled(rectest, 13) - if have_fromkeys: - def testDict(self): - self.run_pickled(dicttest, 20, 13) + ## Pickling of all three dictionary iterator types. + + # Test picking of the dictionary keys iterator. + def testDictIterkeys(self): + self.run_pickled(dicttestiterkeys, 20, 13) + + # Test picking of the dictionary values iterator. + def testDictItervalues(self): + self.run_pickled(dicttestitervalues, 20, 13) + + # Test picking of the dictionary items iterator. + def testDictIteritems(self): + self.run_pickled(dicttestiteritems, 20, 13) + + # Test pickling of iteration over the set type. + def testSet(self): + self.run_pickled(settest, 20, 13) if have_enumerate: def testEnumerate(self): @@ -181,7 +213,7 @@ next-1 and self(self, next-1) or (schedule(), 42)[1] pickle.loads(pickle.dumps(recurse)) self.run_pickled(recurse, recurse, 13) - + def testRecursiveEmbedded(self): def rectest(nrec, lev=0): if self.verbose: print nrec, lev _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From python-checkins at python.org Sat May 6 23:17:49 2006 From: python-checkins at python.org (richard.tew) Date: Sat, 6 May 2006 23:17:49 +0200 (CEST) Subject: [Stackless-checkins] r45927 - stackless/Python-2.4.3/dev/Stackless/platf/slp_switch_stack.h Message-ID: <20060506211749.5C8181E4004@bag.python.org> Author: richard.tew Date: Sat May 6 23:17:48 2006 New Revision: 45927 Modified: stackless/Python-2.4.3/dev/Stackless/platf/slp_switch_stack.h Log: Doesn't appear to be used, but checking it in anyway. Modified: stackless/Python-2.4.3/dev/Stackless/platf/slp_switch_stack.h ============================================================================== --- stackless/Python-2.4.3/dev/Stackless/platf/slp_switch_stack.h (original) +++ stackless/Python-2.4.3/dev/Stackless/platf/slp_switch_stack.h Sat May 6 23:17:48 2006 @@ -22,6 +22,9 @@ } } +#elif defined(MS_WIN64) && defined(_M_X64) + + #elif defined(__GNUC__) && defined(__i386__) static int @@ -44,6 +47,28 @@ __asm__ volatile ("" : : : "ebx", "esi", "edi"); } +#elif defined(__GNUC__) && defined(__amd64__) + +static int +slp_switch_stack(void) +{ + register long *stackref, stsizediff; + __asm__ volatile ("" : : : REGS_TO_SAVE); + __asm__ ("movq %%rsp, %0" : "=g" (stackref)); + { + SLP_STACK_BEGIN(stackref, stsizediff); + __asm__ volatile ( + "addq %0, %%rsp\n" + "addq %0, %%rbp\n" + : + : "r" (stsizediff) + ); + SLP_STACK_END(); + return 0; + } + __asm__ volatile ("" : : : REGS_TO_SAVE); +} + #elif defined(__GNUC__) && defined(__PPC__) && defined(__linux__) static int @@ -190,5 +215,8 @@ __asm__ volatile ("" : : : REGS_TO_SAVE); } +#elif defined(__GNUC__) && defined(__arm__) && defined(__thumb__) + + #endif _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From python-checkins at python.org Sun May 7 21:17:41 2006 From: python-checkins at python.org (richard.tew) Date: Sun, 7 May 2006 21:17:41 +0200 (CEST) Subject: [Stackless-checkins] r45933 - stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py Message-ID: <20060507191741.797F41E400A@bag.python.org> Author: richard.tew Date: Sun May 7 21:17:41 2006 New Revision: 45933 Modified: stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py Log: Added a test for the recent tasklet/channel unpickling crash bug (see SVN revision 45902). Modified: stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py ============================================================================== --- stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py (original) +++ stackless/Python-2.4.3/dev/Stackless/unittests/test_pickle.py Sun May 7 21:17:41 2006 @@ -2,6 +2,7 @@ import types import unittest import cPickle as pickle +import gc from stackless import schedule, tasklet, stackless @@ -32,6 +33,12 @@ schedule() return lst +class TaskletChannel: + def __init__(self): + self.channel = stackless.channel() + def run(self): + self.channel.receive() + def listtest(n, when): for i in range(n): if i == when: @@ -226,6 +233,25 @@ def testFakeModules(self): types.ModuleType('fakemodule!') + # Crash bug. See SVN revision 45902. + # Unpickling race condition where a tasklet unexpectedly had setstate + # called on it before the channel it was blocked on. This left it + # linked to the channel but not blocked, which meant that when it was + # scheduled it was not linked to the scheduler, and this caused a + # crash when the scheduler tried to remove it when it exited. + def testGarbageCollection(self): + # Make a class that holds onto a reference to a channel + # and then block it on that channel. + tc = TaskletChannel() + t = stackless.tasklet(tc.run)() + t.run() + # Pickle the tasklet that is blocking. + s = pickle.dumps(t) + # Unpickle it again, but don't hold a reference. + pickle.loads(s) + # Force the collection of the unpickled tasklet. + gc.collect() + if __name__ == '__main__': if not sys.argv[1:]: _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins From python-checkins at python.org Tue May 16 15:40:18 2006 From: python-checkins at python.org (richard.tew) Date: Tue, 16 May 2006 15:40:18 +0200 (CEST) Subject: [Stackless-checkins] r46014 - stackless/binaries-pc/python24.zip stackless/binaries-pc/python24.zip.md5.py Message-ID: <20060516134018.39DC41E4007@bag.python.org> Author: richard.tew Date: Tue May 16 15:39:47 2006 New Revision: 46014 Modified: stackless/binaries-pc/python24.zip stackless/binaries-pc/python24.zip.md5.py Log: Updated binaries for the recursion crash bug, based on Christian's fix and Grant Olson's test case. Modified: stackless/binaries-pc/python24.zip ============================================================================== Binary files. No diff available. Modified: stackless/binaries-pc/python24.zip.md5.py ============================================================================== --- stackless/binaries-pc/python24.zip.md5.py (original) +++ stackless/binaries-pc/python24.zip.md5.py Tue May 16 15:39:47 2006 @@ -1,6 +1,6 @@ import md5 -expected = "a25a5cc5bd1bec37dda1a542e9a52cec" +expected = "44fdd18bec35f087efa4b608f24b21f0" fname = r"python24.zip" print "expected digest", expected received = md5.md5(file(fname, "rb").read()).hexdigest() _______________________________________________ Stackless-checkins mailing list Stackless-checkins at stackless.com http://www.stackless.com/mailman/listinfo/stackless-checkins