[pypy-dev] Free BSD pypy port

David Naylor naylor.b.david at gmail.com
Tue Dec 13 19:31:55 CET 2011


On Tuesday, 13 December 2011 19:28:07 Maciej Fijalkowski wrote:
> On Tue, Dec 13, 2011 at 7:24 PM, David Naylor <naylor.b.david at gmail.com> wrote:
> > On Tuesday, 13 December 2011 19:03:09 Maciej Fijalkowski wrote:
> >> On Tue, Dec 13, 2011 at 6:55 PM, David Naylor <naylor.b.david at gmail.com>
> > 
> > wrote:
> >> > On Tuesday, 13 December 2011 18:16:26 Maciej Fijalkowski wrote:
> >> >> On Tue, Dec 13, 2011 at 6:14 PM, Maciej Fijalkowski
> >> >> <fijall at gmail.com>
> >> > 
> >> > wrote:
> >> >> > Hi David, CC pypy-dev
> >> >> > 
> >> >> > Can you explain the choice of options here:
> >> >> > http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/pypy/Makefile?rev=
> >> >> > 1.1 ;co ntent-type=text%2Fplain;only_with_tag=HEAD
> >> >> > 
> >> >> > Especially, the objspace, gc and gcrootfinder choices.
> >> >> > 
> >> >> > Cheers,
> >> >> > fijal
> >> > 
> >> > Hi
> >> > 
> >> >> I guess I simply mistaken examples for real code, sorry
> >> > 
> >> > For reference, the predefined options are at:
> >> > http://www.freebsd.org/cgi/cvsweb.cgi/ports/lang/pypy/files/bsd.pypy.i
> >> > nst .mk?rev=1.1
> >> > 
> >> > Currently there are the default, sandbox and CLI predefined options.
> >> >  The CLI currently is not supported (WIP).
> >> > 
> >> > Regards
> >> 
> >> Cool, that all sounds good, --thread is on by default you don't have
> >> to specify it (it also does not hurt).
> > 
> > Thanks, I'll remove --thread.  I prefer to keep the default implicit
> > (avoids having to track them).
> 
> You need --gcrootfinder=shadowstack for clang-based build, however the
> resulting executable *is* slower, so it's not advised to use it with
> gcc

It appears the shadowstack is not the default and that asmgcc does not work with gcc under FreeBSD:
# gcc --version
gcc (GCC) 4.2.1 20070831 patched [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# /usr/local/bin/pypy translate.py --source --gcrootfinder=asmgcc -Ojit  targetpypystandalone.py
<snip/>
python /pypy/translator/c/gcc/trackgcroot.py -t module__sre_interp_sre.s > module__sre_interp_sre.gctmp
Traceback (most recent call last):
  File "/pypy/translator/c/gcc/trackgcroot.py", line 2008, in <module>
    tracker.process(f, g, filename=fn)
  File "/pypy/translator/c/gcc/trackgcroot.py", line 1901, in process
    tracker = parser.process_function(lines, filename)
  File "/pypy/translator/c/gcc/trackgcroot.py", line 1418, in process_function
    table = tracker.computegcmaptable(self.verbose)
  File "/pypy/translator/c/gcc/trackgcroot.py", line 60, in computegcmaptable
    self.trackgcroots()
  File "/pypy/translator/c/gcc/trackgcroot.py", line 335, in trackgcroots
    self.walk_instructions_backwards(walker, insn, loc)
  File "/pypy/translator/c/gcc/trackgcroot.py", line 354, in walk_instructions_backwards
    for prevstate in walker(insn, state):
  File "/pypy/translator/c/gcc/trackgcroot.py", line 327, in walker
    source = insn.source_of(loc, tag)
  File "/pypy/translator/c/gcc/instruction.py", line 130, in source_of
    (localvar,))
AssertionError: must come from an argument to the function, got <-72;esp>
gmake: *** [module__sre_interp_sre.gcmap] Error 1

I remember testing other versions of gcc with the same result.  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20111213/53a77afd/attachment.pgp>


More information about the pypy-dev mailing list