From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: RFC: (ice-9 sandbox)
Date: Fri, 31 Mar 2017 18:26:39 +0200 [thread overview]
Message-ID: <87mvc19zuo.fsf@pobox.com> (raw)
In-Reply-To: <871std65px.fsf@gnu.org> ("Ludovic Courtès"'s message of "Fri, 31 Mar 2017 13:33:30 +0200")
On Fri 31 Mar 2017 13:33, ludo@gnu.org (Ludovic Courtès) writes:
> Andy Wingo <wingo@pobox.com> skribis:
>
> The allocations that trigger ‘after-gc-hook’ could be caused by a
> separate thread, right? That’s probably an acceptable limitation, but
> one to be aware of.
Ah yes, we should document this. Sadly we just don't have very good
metrics here.
> Also, if the code does:
>
> (make-bytevector (expt 2 32))
>
> then ‘after-gc-hook’ run too late, as the comment notes.
Yep.
> IIUC ‘@@’ in unavailable in the returned module, right?
Correct. You could put it there but that's a bad ideal.
> Isn’t make-fresh-user-module + purify-module! equivalent to just
> (make-module)?
No, beautify-user-module! does a few more things too. I was thinking
that we would want to be able to work on the public interface of the
module so I wanted to make sure it was there but in retrospect we don't
need it and can probably simplify things I guess.
>> ;; These can only form part of a safe binding set if no mutable
>> ;; pair is exposed to the sandbox.
>> (define *mutating-pair-bindings*
>> '(((guile)
>> set-car!
>> set-cdr!)))
>
> When used on a literal pair (mapped read-only), these can cause a
> segfault. Now since the code is ‘eval’d, the only literal pairs it can
> see are those passed by the caller I suppose, so this may be safe?
Who knows. I mean vector-set! can also cause segfaults. I think we
should fix that situation to throw an exception.
>> (define *all-pure-and-impure-bindings*
>> (append *all-pure-bindings*
>
> Last but not least: why all the stars? :-)
> I’m used to ‘%something’.
For me I read % as being pronounced "sys" and indicating internal
bindings. Why do you use it for globals? Is it your proposal that we
use it for globals?
Andy
next prev parent reply other threads:[~2017-03-31 16:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 9:27 RFC: (ice-9 sandbox) Andy Wingo
2017-03-31 11:33 ` Ludovic Courtès
2017-03-31 16:26 ` Andy Wingo [this message]
2017-03-31 21:41 ` Ludovic Courtès
2017-04-02 10:18 ` Andy Wingo
2017-04-03 15:35 ` Ludovic Courtès
2017-04-14 10:52 ` Andy Wingo
2017-04-14 12:17 ` tomas
2017-04-14 12:32 ` Ludovic Courtès
2017-03-31 14:41 ` Mike Gran
2017-04-01 14:33 ` Christopher Allan Webber
2017-04-06 21:41 ` Freja Nordsiek
2017-04-14 10:58 ` Andy Wingo
2017-04-15 17:23 ` Nala Ginrut
2017-04-17 8:07 ` Andy Wingo
2017-04-17 9:12 ` Nala Ginrut
2017-04-18 19:48 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mvc19zuo.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).