[racket] ~a and sandbox

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri Jan 24 13:35:32 EST 2014

This is probably because ~a has a contract on it and the contract system
does fancy stuff to figure out names for blame assignment, including
possibly looking at that file.

This problem has been fixed in the current git code and the fix should be
included in our next release (due out soon).

Robby



On Fri, Jan 24, 2014 at 12:23 PM, 75thNumber . <miloarvidsson at gmail.com>wrote:

> i'm using racket textual v5.3.6 on windows.
>
> ~a seems to be crashing my sandboxed programs.
>
> Here's an example (foo.rkt):
>
>   #lang racket/base
>
>   (require racket/sandbox)
>
>   (define evaluate (make-evaluator 'racket '(define (main) (~a (+ 1 2)))))
>
>   (evaluate '(main))
>
> When I run foo.rkt at the prompt, I get an error:
>
> d:\test\racket foo.rkt
>
> current-directory: `exists' access denied for D:\test\
>   context...:
>    C:\Program
> Files\Racket-Textual\collects\setup\private\main-collects.rkt:19:4:
> find-main-collects
>    C:\Program
> Files\Racket-Textual\collects\racket\private\promise.rkt:104:10
>    C:\Program
> Files\Racket-Textual\collects\racket\private\more-scheme.rkt:263:2:
> call-with-exception-handler
>    C:\Program
> Files\Racket-Textual\collects\racket\private\promise.rkt:96:0:
> force/generic
>    C:\Program Files\Racket-Textual\collects\setup\path-relativize.rkt:31:4:
> exploded-root
>    C:\Program
> Files\Racket-Textual\collects\racket\private\promise.rkt:104:10
>    C:\Program
> Files\Racket-Textual\collects\racket\private\more-scheme.rkt:263:2:
> call-with-exception-handler
>    C:\Program
> Files\Racket-Textual\collects\racket\private\promise.rkt:96:0:
> force/generic
>    C:\Program Files\Racket-Textual\collects\setup\path-relativize.rkt:34:2:
> path->relative
>    C:\Program
> Files\Racket-Textual\collects\setup\path-to-relative.rkt:31:2:
> path->relative-string9
>    C:\Program
> Files\Racket-Textual\collects\racket\contract\private\provide.rkt:58:9
>    C:\Program Files\Racket-Textual\collects\racket\sandbox.rkt:631:18
>    C:\Program Files\Racket-Textual\collects\racket\sandbox.rkt:363:0:
> call-with-limits
>    C:\Program Files\Racket-Textual\collects\racket\sandbox.rkt:611:0:
> evaluate-program
>    C:\Program
> Files\Racket-Textual\collects\racket\private\more-scheme.rkt:146:2:
> call-with-break-parameterization
>    C:\Program Files\Racket-Textual\collects\racket\sandbox.rkt:744:2:
> user-process
>
> I don't get an error when I remove the call to ~a.
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140124/41518e4f/attachment.html>

Posted on the users mailing list.