chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix for qt-light (rest operation inside closure would fail)


From: felix . winkelmann
Subject: Re: [PATCH] Fix for qt-light (rest operation inside closure would fail)
Date: Thu, 12 Dec 2019 13:00:40 +0100

> Hi all,
>
> As found by Kon Lovett, there was still a bug in the rest argument
> handling when the rest argument was moved inside a closure and the
> rest argument would no longer be accessible locally but needs to be
> converted to a closure reference.
>
> I have been unable to come up with a truly minimal testcase so far.
> The bug initially got triggered by the qt-light egg.  I managed to
> whittle it down to the match-lambda* in qt:gl, but converting it to
> manual list-ref calls on a lambda with a rest argument did not succeed
> in triggering this bug.
>
> The smaller self-contained test case that triggers the bug is at:
>
> https://paste.call-cc.org/paste?id=5d9bbafd8fee588e06c06b91b909f3f811e64257
>
> I want to take some more time to figure out if I can come up with a small
> testcase, but I did not want to wait with sharing the fix.  I don't know
> when I'll have time to dig into this again.

Works for me - pushed. Note that the example posted by megane
seems to trigger the bug:

; compile with -O3:
(import scheme (chicken base))
((lambda f0
   (let ((v0 f0))
     (let ((failure0
            (lambda ()
              (if (scheme#pair? v0)
                  (scheme#car v0)))))
       (failure0))))
 1)


felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]