Opened 13 months ago

Closed 7 weeks ago

#1754 closed defect (fixed)

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

Description

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.

Attachments (2)

0001-Use-eval-decorator-from-C5.patch (906 bytes) - added by Vasilij Schneidermann 7 weeks ago.
0001-Improve-test-suite-to-check-for-error-messages.patch (3.5 KB) - added by Vasilij Schneidermann 7 weeks ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 months 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 7 months 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.

Changed 7 weeks ago by Vasilij Schneidermann

Changed 7 weeks ago by Vasilij Schneidermann

comment:3 Changed 7 weeks ago by felix winkelmann

Resolution: fixed
Status: newclosed

The patches have been applied (r41254)

Note: See TracTickets for help on using tickets.