[racket] ~a and sandbox

From: 75thNumber . (miloarvidsson at gmail.com)
Date: Fri Jan 24 13:23:42 EST 2014

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.

Posted on the users mailing list.