New issue 2212: black -> white pointer in the GC
https://bitbucket.org/pypy/pypy/issues/2212/black-white-pointer-in-the-gc

Armin Rigo:

It is possible to hit this assertion in our incremental GC:

```
#!python

ll_assert(False, "black -> white pointer found")
```

because of the JIT's rewrite.py, which will not put a write barrier before a 
``setfield(p0, p1)`` if ``p1`` is an old constant.  But p1 might be white and 
p0 black.  I've no clue why the problem doesn't show up more often, but it 
triggers the assert above with the proper `PYPY_GC_*` env vars.

I think that it is not an important issue: in this case, the constant `p1` is 
also always reachable from the CompiledLoop itself.  If we reach the assert in 
the GC, it's because the ``setfield`` was executed recently, during the same 
major collection iteration.  The loop itself is alive during this 
iteration---running JIT assembler relies on the loop being alive.  So we will 
anyway see the same ConstPtr from the loop.

Is the above reasoning correct?  Am I missing an edge case?


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to