[plt-scheme] continuation barrier

From: Thomas Chust (chust at web.de)
Date: Fri Apr 17 19:44:01 EDT 2009

2009-04-17 DTNOIZR <dtnoizerz58 at yandex.ru>:
> [...]
> how to remove continuation barrier from sandbox?
> using sandboxing with web - using send/suspend - using continuations ...
> send/suspend dont work in sandbox
> [...]

Hello,

I don't think it is possible to remove a continuation barrier -- if
that was possible it would defy the security aspect of this feature.

However, a quick experiment with scheme/sandbox makes me doubt that
sandbox evaluators really automatically install continuation barriers
around the code they run:

(require
 scheme/sandbox)

(define my-eval
  (parameterize ([sandbox-output (current-output-port)])
    (make-evaluator 'scheme/base)))

((my-eval '(begin
             (define resume
               #f)
             (define ((set-resume!/value v) k)
               (set! resume k) v)

             (display (call/cc (set-resume!/value 1)))
             (newline)
             resume))
 2)

This code runs without problems in PLT Scheme 4.1.5, thus it is
apparently possible to invoke a continuation created inside the
sandbox outside of it.

Maybe a more detailed description of your problem would shed some
light on the situation...

cu,
Thomas


-- 
When C++ is your hammer, every problem looks like your thumb.


Posted on the users mailing list.