[pypy-commit] lang-smalltalk stmgc-c7: Possible fix of a off by one fault in the SchedulerWrapper

Patrick Rein noreply at buildbot.pypy.org
Sun Aug 10 16:21:50 CEST 2014


Author: Patrick Rein <patrick.rein at student.hpi.uni-potsdam.de>
Branch: stmgc-c7
Changeset: r1033:48efd13caa41
Date: 2014-08-10 16:18 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/48efd13caa41/

Log:	Possible fix of a off by one fault in the SchedulerWrapper

diff --git a/spyvm/wrapper.py b/spyvm/wrapper.py
--- a/spyvm/wrapper.py
+++ b/spyvm/wrapper.py
@@ -205,7 +205,8 @@
     def get_process_list(self, priority):
         lists = Wrapper(self.space, self.priority_list())
 
-        return ProcessListWrapper(self.space, lists.read(priority))
+        # priority - 1 as listWrapper is 0 indexed and Priorities start at 1
+        return ProcessListWrapper(self.space, lists.read(priority - 1))
 
     def pop_highest_priority_process(self):
         w_lists = self.priority_list()


More information about the pypy-commit mailing list