Error While Translating Interpreter
Hi, I'm getting error while translating pypy interpreter (in pypy-0.8.x version) on ppc machine. The machine is Macintosh G5, and OS is Fedora Core 4; and the error code looks like following: [translation:ERROR] Error: [translation:ERROR] Traceback (most recent call last): [translation:ERROR] File "./translate_pypy.py", line 278, in main [translation:ERROR] drv.proceed(goals) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/goal/drive [translation:ERROR] self._execute(goals, task_skip = self.maybe_skip) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/tool/taske [translation:ERROR] self._do(goal, taskcallable, *args, **kwds) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/goal/drive [translation:ERROR] func() [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/goal/drive [translation:ERROR] annotator = translator.annotate(self.inputtypes, policy= [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/translator [translation:ERROR] self.annotator.build_types(graph, input_args_types, func [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/annrpython [translation:ERROR] self.complete() [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/annrpython [translation:ERROR] self.processblock(fn, block) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/annrpython [translation:ERROR] self.flowin(fn, block) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/annrpython [translation:ERROR] self.consider_op(block.operations[i]) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/translator/annrpython [translation:ERROR] resultcell = consider_meth(*argcells) [translation:ERROR] File "<string>", line 3, in consider_op_getattr [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/unaryop.py [translation:ERROR] attrdef = ins.classdef.find_attribute(attr) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/classdef.p [translation:ERROR] return self.locate_attribute(attr).attrs[attr] [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/classdef.p [translation:ERROR] self.generalize_attr(attr) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/classdef.p [translation:ERROR] self._generalize_attr(attr, s_value) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/classdef.p [translation:ERROR] newattr.add_constant_source(source, classdef) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/classdef.p [translation:ERROR] s_value = self.bookkeeper.immutablevalue( [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/bookkeeper [translation:ERROR] clsdef.add_source_for_attribute(attr, x) # can trigger r [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/classdef.p ribute [translation:ERROR] attrdef.add_constant_source(source, clsdef) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/classdef.p [translation:ERROR] s_value = self.bookkeeper.immutablevalue( [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/bookkeeper [translation:ERROR] result.dictdef.generalize_value(self.immutablevalue(ev)) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/bookkeeper [translation:ERROR] clsdef.add_source_for_attribute(attr, x) # can trigger r [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/classdef.p ribute [translation:ERROR] attrdef.add_constant_source(source, clsdef) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/classdef.p [translation:ERROR] s_value = self.bookkeeper.immutablevalue( [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/bookkeeper [translation:ERROR] result.dictdef.generalize_value(self.immutablevalue(ev)) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/annotation/bookkeeper [translation:ERROR] frozen = hasattr(x, '_freeze_') and x._freeze_() [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/mixedmodu [translation:ERROR] self.getdict() [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/mixedmodu [translation:ERROR] w_value = self.get(name) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/mixedmodu [translation:ERROR] w_value = self.getdictvalue(space, name) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/mixedmodu [translation:ERROR] w_value = loader(space) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/mixedmodu [translation:ERROR] return app.wget(space, attrname) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/gateway.p [translation:ERROR] w_globals = self.getwdict(space) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/gateway.p [translation:ERROR] return space.fromcache(ApplevelCache).getorbuild(self) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/tool/cache.py", line [translation:ERROR] result = self._build(key) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/baseobjsp [translation:ERROR] return self.build(key) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/gateway.p [translation:ERROR] return PyPyCacheDir.build_applevelinterp_dict(app, self. [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/gateway.p rp_dict [translation:ERROR] w_glob = initfunc(space) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/_cache/app_array_f5e7 ine 4006, in init__builtin__ [translation:ERROR] glong_minus_2147483648 = long_helper('x80000000') [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/_cache/app_array_f5e7 ine 4005, in long_helper [translation:ERROR] return space.eval("long(%r, 16)" % value, dic, dic) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/baseobjsp [translation:ERROR] return expression.exec_code(self, w_globals, w_locals) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/eval.py", [translation:ERROR] return frame.run() [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/eval.py", [translation:ERROR] result = self.eval(executioncontext) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/pyframe.p [translation:ERROR] ctlflowexc.action(self) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/pyframe.p [translation:ERROR] ControlFlowException.action(self, frame) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/pyframe.p [translation:ERROR] self.emptystack(frame) [translation:ERROR] File "/u/jiwon/proj/pypy-0.8.x/pypy/interpreter/pyframe.p [translation:ERROR] raise self.operr [translation:ERROR] OperationError: [<W_TypeObject(ValueError)>: W_StringObject 0000')] [translation:ERROR] Processing block: [translation:ERROR] block@228 is a SpamBlock in the graph of Module.pick_builti [translation:ERROR] at pypy.module.__builtin__:118 [translation:ERROR] containing the following operations: [translation:ERROR] v2 = simple_call((type Module), space_0, (None)) [translation:ERROR] v3 = getattr(space_0, ('setitem')) [translation:ERROR] v4 = getattr(v2, ('w_dict')) [translation:ERROR] v5 = getattr(space_0, ('wrap')) [translation:ERROR] v6 = simple_call(v5, ('None')) [translation:ERROR] v7 = getattr(space_0, ('w_None')) [translation:ERROR] v8 = simple_call(v3, v4, v6, v7) [translation:ERROR] --end-- Any idea what's going on? or does translator run ok on ppc linux? or do you advise me to run it with latest version of pypy? Thanks, -Jiwon
Hi Jiwon, On Wed, Apr 26, 2006 at 02:46:40PM -0700, Jiwon Seo wrote:
[translation:ERROR] glong_minus_2147483648 = long_helper('x80000000')
This bug was fixed in the meantime, so yes, you should use the current PyPy version. Actually the bug only showed up on CPython 2.5. It's caused by the new AST compiler (a CPython "bug" or change that wasn't fixed so far). Are you using 2.5 already? There are other problems with 2.5 in PyPy... A bientot, Armin.
Hi,
This bug was fixed in the meantime, so yes, you should use the current PyPy version.
Actually the bug only showed up on CPython 2.5. It's caused by the new AST compiler (a CPython "bug" or change that wasn't fixed so far). Are you using 2.5 already? There are other problems with 2.5 in PyPy...
No. Actually, it works fine now. Now I have to look into translated code since the simulator that I'm linking pypy against and running on is very unstable and gives me segfault. Any ideas? :) -Jiwon
Hi Jiwon, On Fri, Apr 28, 2006 at 08:05:26AM -0700, Jiwon Seo wrote:
No. Actually, it works fine now. Now I have to look into translated code since the simulator that I'm linking pypy against and running on is very unstable and gives me segfault. Any ideas? :)
It's hard to separate a priori between the five things that are special in your case :-) It could be some incompatibility with the simulator, or the fact that PyPy cannot cross-translate itself -- the result only works on the same host as the one used for translation, but a simulator is a new virtual host. Or it could simply be your platform, or the fact that we never tried to link PyPy against external stuff, or just plainly bugs that we fixed since the 0.8 release... A bientot, Armin.
participants (3)
-
Armin Rigo
-
Jiwon Seo
-
Jiwon Seo