class C:
def __init__(self):
self.a = [1,2,3]
def f(self):
self.a.append(4)
freeze(self.a)
foo = C() # foo.a: [1, 2, 3]
foo.f() # ok, foo.a: [1, 2, 3, 4]
foo.f() # ok, foo.a: [1, 2, 3, 4, 4]
foo.a.append(5) # TypeError: object of type list is immutable
This looks similar to other bugs I saw with regions. It's very likely that C.f gets optimized and the optimized bytecode is missing the write barrier
Bug found by Vanja:
This looks similar to other bugs I saw with regions. It's very likely that
C.fgets optimized and the optimized bytecode is missing the write barrier