Commit Graph

68 Commits

Author SHA1 Message Date
Matthew Flatt
d4e40e0b25 fix some problems with sandboxes and extension (PR 10381) and Snow Leopard extension building (also demonstrated by PR 10381)
svn: r15964
2009-09-10 19:39:37 +00:00
Eli Barzilay
233df48709 Fixed module-specs->non-lib-paths which was very broken in several different ways (PR10305)
svn: r15180
2009-06-15 21:44:54 +00:00
Eli Barzilay
5f7e052469 removed old unused argument
svn: r15179
2009-06-15 20:43:33 +00:00
Matthew Flatt
a61e7b67f9 fix more break-progaration problems in scheme/sandbox (where recent changes were not quite right)
svn: r14219
2009-03-22 16:26:01 +00:00
Matthew Flatt
154b73755a sandbox break propagation
svn: r14182
2009-03-19 12:31:33 +00:00
Eli Barzilay
97b3e6ba96 * Wrap a `#%top-interaction' around evaluations. No way to configure
or disable it yet.
* Instantiate scheme/class into teaching language sandboxes, to make
  it possible to use the test engine (still no way to report errors
  yet).
* Some minor formatting and renames

svn: r13836
2009-02-25 17:13:28 +00:00
Eli Barzilay
a2537d7dc9 second attempt at forbidding self-calls, with a long explanation why its forbidden, which is actually a sketch for how to make it work...
svn: r13376
2009-02-03 13:29:33 +00:00
Matthew Flatt
dd67fa3cfb disable sandbox nested-evaluator check
svn: r13349
2009-02-02 13:10:25 +00:00
Eli Barzilay
39e07d0843 forbid nested evaluator calls
svn: r13338
2009-01-31 19:44:20 +00:00
Eli Barzilay
13e58dc786 * Fix call-with-custodian-shutdown and call-with-killing-threads
* Organize similarities into a utility `nested' function
* Make trusted configuration disable the evaluation handlers

svn: r12891
2008-12-18 20:25:03 +00:00
Eli Barzilay
11107f4e22 (Second part of the previous commit)
svn: r12886
2008-12-18 13:43:59 +00:00
Eli Barzilay
0c85f221be Added:
sandbox-eval-handlers
  set-eval-handler
  call-with-custodian-shutdown
  call-with-killing-threads
Added optional `unrestricted?' argument to `call-in-sandbox-context'

svn: r12885
2008-12-18 13:35:49 +00:00
Matthew Flatt
efd7446b09 current-exit-handler => exit-handler
svn: r12874
2008-12-17 00:04:20 +00:00
Eli Barzilay
f74dc2b8c7 Added `call-with-trusted-sandbox-configuration', and used in scribble
and in tests.

svn: r12871
2008-12-16 20:29:17 +00:00
Eli Barzilay
0cd1b5fea9 * reorganize termination code a bit better
* use it when the sandbox is being setup, so we catch an out of memory
  error at that time

svn: r12854
2008-12-15 17:13:44 +00:00
Matthew Flatt
45e4684e4f memory accounting: blame the parent instead of the child
svn: r12853
2008-12-15 17:09:33 +00:00
Eli Barzilay
ab115fb6e4 default global limit is 30mb
svn: r12852
2008-12-15 16:26:25 +00:00
Eli Barzilay
b882de2409 allow any number for memory limits
svn: r12851
2008-12-15 16:22:41 +00:00
Eli Barzilay
a2ef8a5aae allow 'exists access to addon directory
svn: r12847
2008-12-15 02:24:32 +00:00
Eli Barzilay
c62595772f Finally enabled using a sub code-inspector properly, with a new
'read-bytecode permission mode.  Added tests and (crappily)
documented.

svn: r12846
2008-12-15 01:07:00 +00:00
Eli Barzilay
340b193571 minor improvements
svn: r12842
2008-12-14 05:17:32 +00:00
Eli Barzilay
9295a1dc27 * Fix memory test
* Better organization of `user-eval'
* Deal with cases when the evaluator dies outside of our control

svn: r12841
2008-12-13 23:26:44 +00:00
Eli Barzilay
5ab0de415d formatting
svn: r12840
2008-12-13 22:45:35 +00:00
Eli Barzilay
39a69b30fd Don't set memory limits or test for them when there is no memory
accounting.

svn: r12839
2008-12-13 22:44:02 +00:00
Eli Barzilay
813eb20e35 termination message now indicates suicides too (both killing the
thread or shutting the custodian)

svn: r12838
2008-12-13 22:39:49 +00:00
Eli Barzilay
188489b34f * Added `exn:fail:sandbox-terminated' for all sandbox termination
kinds.
* The default exit handler kills the sandbox, with an appropriate
  termination message.
* Also, sending an eof to the sandbox shows 'eof as the reason
* Added some tests for these.
* Still need to deal with termination messages for evaluator suicide.

svn: r12837
2008-12-13 22:12:16 +00:00
Eli Barzilay
bd01cda595 typo in the last commit
svn: r12832
2008-12-13 17:18:40 +00:00
Eli Barzilay
46e16fc206 * The sandbox now uses a new code-inspector to avoid using protected
bindings
* Added `sandbox-make-code-inspector' to control this
* Changed the function form of `sandbox-security-guard' to be a thunk,
  to make it uniform with other sandbox settings.

svn: r12831
2008-12-13 17:17:12 +00:00
Eli Barzilay
55f1df58e1 Make sure that the module is also instantiated under the evaluation
limits too (the instantiation was happening outside of the limited
thunk)

svn: r12830
2008-12-13 16:41:07 +00:00
Eli Barzilay
e2221c800b * sandbox-security-guard can now be a function that translates a given
security guard to a new one
* this is now used for the default to avoid grabbing the global
  security guard

svn: r12828
2008-12-13 14:11:28 +00:00
Eli Barzilay
ac5d6d66c1 make call-in-nested-thread avoid potential break problem
svn: r12792
2008-12-12 17:25:03 +00:00
Eli Barzilay
90492a0606 avoid timer-killing problem; cust-box might not be set
svn: r12791
2008-12-12 17:22:24 +00:00
Eli Barzilay
3fcc58c05e minor improvements
svn: r12789
2008-12-12 13:43:05 +00:00
Eli Barzilay
c76a23ed29 termination message indicates whether the sandbox died because of memory limit
svn: r12788
2008-12-12 13:32:20 +00:00
Eli Barzilay
a1222d66ca * Implementer global sandbox memory limit and added
`sandbox-memory-limit' to set it
* Added `evaluator-alive?'
* Undo accidental commenting of most tests

svn: r12786
2008-12-12 12:45:08 +00:00
Eli Barzilay
a0d1baea00 When an expression evaluation dies out of memory, the sandbox stays alive
svn: r12785
2008-12-12 11:22:08 +00:00
Eli Barzilay
c979ffa85a small fix, other minor things
svn: r12784
2008-12-12 10:29:28 +00:00
Eli Barzilay
f7c16fc8bb * fix last commit
* when make-module-evaluator gets a path, allow reading that path
  automatically (since that's where the source is)

svn: r12778
2008-12-11 18:34:58 +00:00
Eli Barzilay
baffbeeeb2 close the input after reading
svn: r12775
2008-12-11 18:00:43 +00:00
Eli Barzilay
10c9b39bfe removed unused variable
svn: r12675
2008-12-02 14:39:36 +00:00
Eli Barzilay
eb54b1a5b2 * Added `call-in-nested-thread*', and used it to improve
`call-with-limits'; specifically, it can now distinguish killing the
  main thread or shutting down the custodian from an out-of-memory
  error.
* This also makes it possible to have threads created and stay alive
  between evaluations.
* Added tests for this.

svn: r12673
2008-12-02 12:23:35 +00:00
Eli Barzilay
e0917e1a5e * Added `call-in-sandbox-context'.
* Removed `get-namespace' since it's generalized in the above.
* Deal with killing the current thread (or the current custodian) in
  the sandbox code.  (Works only without per-expression limits --
  still need to find a solution for `call-with-limits'.)
* Added tests for this.

svn: r12670
2008-12-02 05:26:45 +00:00
Eli Barzilay
fc920b18bb set-eval-limits requires two arguments
svn: r12669
2008-12-02 00:15:58 +00:00
Eli Barzilay
ab817097b4 * Create string/bytes output port in the user's custodian (at least
try to do so...).
* Add tests for output collection under resources -- some are
  commented since they're not working right, either a bug in this code
  that I don't see, or some problem with memory accounting.
* Clarify in the docs that output collection is still under resource
  limits.

svn: r12667
2008-12-01 22:19:58 +00:00
Eli Barzilay
12467b4ecd better organization for running resource limited code
svn: r12666
2008-12-01 21:28:28 +00:00
Eli Barzilay
0c2410739a cust -> user-cust
svn: r12665
2008-12-01 21:22:53 +00:00
Eli Barzilay
8905cc86e5 Added `sandbox-exit-handler' to control the exit handler
svn: r12654
2008-11-30 21:44:47 +00:00
Eli Barzilay
d9b4e619eb add quotes
svn: r12404
2008-11-12 05:37:52 +00:00
Eli Barzilay
b1aee15004 improve bad access error (PR9901)
svn: r12403
2008-11-12 05:36:52 +00:00
Eli Barzilay
8009a73622 added get-namespace
svn: r12364
2008-11-09 07:35:49 +00:00