[pypy-issue] [issue1210] asmgcc AssertionError: must come from an argument to the function, got '%rax'
Soares Chen
tracker at bugs.pypy.org
Sun Jul 8 11:34:40 CEST 2012
New submission from Soares Chen <soares.chen at gmail.com>:
There is this obscure asmgcc bug that I came across while trying to compile the py3k branch
on Ubuntu using GCC 4.6.1 with opt=jit.
The involved generated assembly code, interpreter_pyopcode.s, is attached and the bug can be
reproduced by running:
pypy/translator/c/gcc/trackgcroot.py -t interpreter_pyopcode.s > interpreter_pyopcode.gctmp
The current workaround is to use the flag --gcrootfinder=shadowstack on translate.py
Following is the last few lines of output before the error:
104 Label(.L1051, 578) --- set(['%r14', '%rbp', '%r12', '%rax'])
104 Label(.L1012, 579) --- set(['%r14', '%rbp', '%r12', '%rax'])
104 InsnCopyLocal(%rax, %rdx) --- set(['%r14', '%rbp', '%r12'])
? InsnStop(jump) --- None
104 Label(.L1057, 582) --- None
104 Label(.L998, 583) --- None
104 InsnCondJump(.L991) --- None
104 Label(.L999, 586) --- None
104 InsnCopyLocal(%rbx, %rdi) --- None
104 InsnCopyLocal(%rbp, %rdx) --- None
104 InsnCopyLocal(%r12, %rsi) --- None
104 InsnCall(590, pypy_g_call_args_and_c_profile__AccessDirect_None, {}) --- None
104 InsnSetLocal(%rax, []) --- None
104 InsnGCROOT(%rbx) --- None
104 InsnCondJump(.L1047) --- None
104 Label(.L1000, 598) --- None
104 InsnSetLocal(%rdx, ['pypydtcount(%rip)']) --- None
? InsnStop(jump) --- None
Traceback (most recent call last):
File "/home/crf/dev/pypy/pypy/translator/c/gcc/trackgcroot.py", line 2023, in <module>
tracker.process(f, g, filename=fn)
File "/home/crf/dev/pypy/pypy/translator/c/gcc/trackgcroot.py", line 1916, in process
tracker = parser.process_function(lines, filename)
File "/home/crf/dev/pypy/pypy/translator/c/gcc/trackgcroot.py", line 1431, in
process_function
table = tracker.computegcmaptable(self.verbose)
File "/home/crf/dev/pypy/pypy/translator/c/gcc/trackgcroot.py", line 60, in
computegcmaptable
self.trackgcroots()
File "/home/crf/dev/pypy/pypy/translator/c/gcc/trackgcroot.py", line 335, in trackgcroots
self.walk_instructions_backwards(walker, insn, loc)
File "/home/crf/dev/pypy/pypy/translator/c/gcc/trackgcroot.py", line 354, in
walk_instructions_backwards
for prevstate in walker(insn, state):
File "/home/crf/dev/pypy/pypy/translator/c/gcc/trackgcroot.py", line 327, in walker
source = insn.source_of(loc, tag)
File "/home/crf/dev/pypy/pypy/translator/c/gcc/instruction.py", line 134, in source_of
(localvar,))
AssertionError: must come from an argument to the function, got '%rax'
----------
files: interpreter_pyopcode.s
messages: 4564
nosy: pypy-issue, soareschen
priority: bug
status: unread
title: asmgcc AssertionError: must come from an argument to the function, got '%rax'
________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1210>
________________________________________
More information about the pypy-issue
mailing list