[pypy-commit] pypy default: A tentative fix for an issue we're unlikely to be able to reproduce,
arigo
noreply at buildbot.pypy.org
Tue May 26 18:02:39 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r77587:4932a555ab4b
Date: 2015-05-26 18:02 +0200
http://bitbucket.org/pypy/pypy/changeset/4932a555ab4b/
Log: A tentative fix for an issue we're unlikely to be able to reproduce,
shown only once by test_zll_stress.
diff --git a/rpython/jit/backend/test/test_ll_random.py b/rpython/jit/backend/test/test_ll_random.py
--- a/rpython/jit/backend/test/test_ll_random.py
+++ b/rpython/jit/backend/test/test_ll_random.py
@@ -17,6 +17,10 @@
def __init__(self, *args, **kw):
test_random.OperationBuilder.__init__(self, *args, **kw)
self.vtable_counter = 0
+ # note: rstrs and runicodes contain either new local strings, or
+ # constants. In other words, all BoxPtrs here were created earlier
+ # by the trace before, and so it should be kind of fine to mutate
+ # them with strsetitem/unicodesetitem.
self.rstrs = []
self.runicodes = []
self.structure_types = []
@@ -484,6 +488,8 @@
class AbstractSetItemOperation(AbstractStringOperation):
def produce_into(self, builder, r):
v_string = self.get_string(builder, r)
+ if not isinstance(v_string, BoxPtr):
+ raise test_random.CannotProduceOperation # setitem(Const, ...)
v_index = builder.get_index(len(v_string.getref(self.ptr).chars), r)
v_target = ConstInt(r.random_integer() % self.max)
builder.do(self.opnum, [v_string, v_index, v_target])
More information about the pypy-commit
mailing list