Opened 7 months ago

Last modified 6 weeks ago

#1754 new defect

sandbox egg test fails on missing ##sys#eval-decorator procedure

Reported by: Vasilij Schneidermann Owned by:
Priority: minor Milestone: someday
Component: extensions Version: 5.2.0
Keywords: sandbox eval Cc: felix winkelmann, winkelmann
Estimated difficulty: easy


When running chicken-install -test sandbox, the second to last test exercising the fuel limit fails with Error: unbound variable: ##sys#eval-decorator. This can be resolved by replacing the respective call in the sandbox sources with the definition of eval-decorator in core's eval.scm. It's unclear whether that will break compatibility with C4 though.

Change History (2)

comment:1 Changed 7 weeks ago by Shawn Rutledge

Confirmed. The egg is not usable this way, AFAICT; I ran into it like this:

<eval> [widget-property-set!] (safe-environment-set! eval-env (quote parent) (-> widget parent))
<eval> [widget-property-set!] (->impl291 widget (quote292 parent))
<eval> [widget-property-set!] (safe-environment-set! eval-env (quote self) widget)
<eval> [widget-property-set!] (safe-eval parsed #:environment eval-env) <--

and your suggestion fixes it:

Index: sandbox.scm
--- sandbox.scm (revision 37281)
+++ sandbox.scm (working copy)
@@ -222,8 +222,21 @@
                x2) )
          x2) ) )
+(define (eval-dec p ll h cntr)
+  (##sys#decorate-lambda
+   p 
+   (lambda (x) (and (not (##sys#immediate? x)) (##core#inline "C_lambdainfop" x)))
+   (lambda (p i)
+     (##sys#setslot 
+      p i 
+      (##sys#make-lambda-info 
+       (let ((o (open-output-string)))
+         (write ll o)
+         (get-output-string o))))
+     p) ) )
   (define (decorate p ll h)
-    (##sys#eval-decorator p ll h #f) )
+    (eval-dec p ll h #f) )
   (define (compile x e h)
     (check-point fuel/compile)

comment:2 Changed 6 weeks ago by Shawn Rutledge

Anyway I'm having trouble getting safe-environment-macro-set! to do what I want; not sure if this fix has something to do with it, or it's just my little experience writing any kind of macros. The docs are not at all clear on what the "procedure of one argument" ought to return. So I keep getting the "illegal non-atomic object" error for almost everything I try.

Note: See TracTickets for help on using tickets.