[pypy-issue] [issue1458] Translation of a PyPy checkout with an older PyPy checkout fails

Yaroslav Fedevych tracker at bugs.pypy.org
Thu Apr 18 13:41:27 CEST 2013


New submission from Yaroslav Fedevych <jaroslaw.fedewicz at gmail.com>:

As of recent year (maybe more), translating a newer pypy checkout with a pypy
built from a less recent checkout fails for me quite reliably with the following
traceback:

[translation:ERROR] Error:
[translation:ERROR]  Traceback (most recent call last):
[translation:ERROR]    File
"/home/jafd/src/pypy/rpython/translator/goal/translate.py", line 317, in main
[translation:ERROR]     drv.proceed(goals)
[translation:ERROR]    File "/home/jafd/src/pypy/rpython/translator/driver.py",
line 733, in proceed
[translation:ERROR]     return self._execute(goals, task_skip = self._maybe_skip())
[translation:ERROR]    File
"/home/jafd/src/pypy/rpython/translator/tool/taskengine.py", line 114, in _execute
[translation:ERROR]     res = self._do(goal, taskcallable, *args, **kwds)
[translation:ERROR]    File "/home/jafd/src/pypy/rpython/translator/driver.py",
line 284, in _do
[translation:ERROR]     res = func()
[translation:ERROR]    File "/home/jafd/src/pypy/rpython/translator/driver.py",
line 464, in task_database_c
[translation:ERROR]     database = cbuilder.build_database()
[translation:ERROR]    File "/home/jafd/src/pypy/rpython/translator/c/genc.py",
line 175, in build_database
[translation:ERROR]     db.complete()
[translation:ERROR]    File
"/home/jafd/src/pypy/rpython/translator/c/database.py", line 302, in complete
[translation:ERROR]     nodedef.setup()
[translation:ERROR]    File "/home/jafd/src/pypy/rpython/translator/c/node.py",
line 111, in setup
[translation:ERROR]     self.gcinfo  # force it to be computed
[translation:ERROR]    File "/home/jafd/src/pypy/rpython/translator/c/node.py",
line 33, in __get__
[translation:ERROR]     return self.fget(obj)
[translation:ERROR]    File "/home/jafd/src/pypy/rpython/translator/c/node.py",
line 124, in computegcinfo
[translation:ERROR]     self.db.gcpolicy.struct_setup(self, rtti)
[translation:ERROR]    File "/home/jafd/src/pypy/rpython/translator/c/gc.py",
line 318, in struct_setup
[translation:ERROR]     fptrs = gctransf.special_funcptr_for_type(TYPE)
[translation:ERROR]    File
"/home/jafd/src/pypy/rpython/memory/gctransform/framework.py", line 520, in
special_funcptr_for_type
[translation:ERROR]     return self.layoutbuilder.special_funcptr_for_type(TYPE)
[translation:ERROR]    File
"/home/jafd/src/pypy/rpython/memory/gctypelayout.py", line 384, in
special_funcptr_for_type
[translation:ERROR]     fptr1, is_lightweight =
self.make_finalizer_funcptr_for_type(TYPE)
[translation:ERROR]    File
"/home/jafd/src/pypy/rpython/memory/gctransform/framework.py", line 1239, in
make_finalizer_funcptr_for_type
[translation:ERROR]     [llmemory.Address], lltype.Void)
[translation:ERROR]    File
"/home/jafd/src/pypy/rpython/memory/gctransform/transform.py", line 277, in
annotate_finalizer
[translation:ERROR]     fptr = self.annotate_helper(ll_finalizer, ll_args,
ll_result)
[translation:ERROR]    File
"/home/jafd/src/pypy/rpython/memory/gctransform/transform.py", line 261, in
annotate_helper
[translation:ERROR]     assert not self.finished_helpers
[translation:ERROR]  AssertionError

The TYPE equals to
GcStruct pypy.module._ffi.interp_struct.W__StructInstance { super, inst_rawmem,
inst_structdescr, inst_autofree }

ll_finalizer is in pypy/rpython/memory/gctransform/framework.py

Also note that CPython does not ever raise this exception.

Also, I was able to reliably build pypy with a pypy built with a pypy
(...loop...) built with CPython. That is, I wasn't able to produce this when
pypy was translated with an identical version of itself. This reproduces fairly
well, though, when pypy binary is a few commits away from the source it tries to
build.

----------
messages: 5591
nosy: jafd, pypy-issue
priority: bug
status: unread
title: Translation of a PyPy checkout with an older PyPy checkout fails

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1458>
________________________________________


More information about the pypy-issue mailing list