Hi,

On Tue, Apr 23, 2013 at 1:48 PM, zcx <zcx3354...@126.com> wrote:
> I have study PyPy's sandbox for some time.But as my limited ability,I can't
> understand the detail about the PyPy's sandbox.

Sorry, PyPy's sandbox is not officially supported for now.  We'd
welcome someone who was interested in really developing it and
maintaining it.

> What are the reasons to cut some standard modules?

The reason is a question of level.  Most standard modules would not
translate.  This is because the sandboxing occurs at a certain level,
namely extdef() as seen for example in rpython.rtyper.module.ll_os;
but most standard modules don't use this, and instead directly call C
functions with llexternal().

It may be possible to change the level and apply sandboxing at the
level of llexternal functions.

> 2.sandbox_transform/sandbox_stub
> This two functions are defined in /pypy/translator/c/node.py, what's the
> difference between them?

sandbox_stub() is used in various cases, including the case I
described above of llexternal functions, and in some cases that are
present only for historical reasons and should be changed.  Over the
long history of PyPy we used to experiment with a number of different
ways to call C functions from RPython, before we eventually settled
for llexternal().

> In addition,I found you have sandbox_transform() about 100+ functions in
> sandboxed interpreter,most of them are start with 'll_os',But in controller
> process,the sandlib.py only implemented about 20+ fucntions.why left others?

No reason.  All other functions are just not written in sandlib.py
because nobody needed them so far.  It's all experimental and was
never seriously completed.


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to