Replacing the line 1758 of optimize.c

-  if ((info->inline_fuel < 0) && info->has_nonleaf && !noapp)
+  if ((info->inline_fuel <= 0) && info->has_nonleaf && !noapp)

make the problem disappear, but I still don't understand why "(dup
rep)" is the only combination that creates a problem.

I also want to think about the "(info->inline_fuel >= 0)" in line 1872
and how that interacts with the "if (noapp)" in line 1876 ...

Gustavo

On Tue, Jul 14, 2015 at 8:38 PM, Gustavo Massaccesi <gust...@oma.org.ar> wrote:
> I reduced it a little, it's a variation of the old
>   ((lambda (x) (x x)) (lambda (x) (x x)))
> but there must be a problem in the inlining fuel.
>
> In my example, the ´dup´ definition is not necessary, but it makes it
> more clear. It can be copied by hand to the application point.
>
> I wrapped the example in a 'lambda', to be sure that it should not be
> executed even once. This lambda is not necessary and can be removed.
>
> #lang racket
> (define dup (lambda (f) (f f)))
> (lambda ()
>   (let ([rep (lambda (f) (f f))])
>     (dup rep)))
>
> It's strange that only (dup rep) causes a problem, (dup dup), (rep
> rep) and (rep dup) are ok.
>
> Gustavo
>
>
> On Tue, Jul 14, 2015 at 6:23 PM, Sam Tobin-Hochstadt
> <sa...@cs.indiana.edu> wrote:
>> This appears to be a bug in the inliner, which appears in HEAD as well.
>>
>> This program is sufficient to reproduce:
>>
>> #lang racket
>>
>> (define (Y3 outer)
>>   (define ((call f) x)
>>     ((f f) x))
>>   ((lambda (f) (f f)) call))
>>
>> I wasn't able to make this any smaller -- in particular, the `outer`
>> parameter is needed. If you try to compile this with `raco make`, it will
>> hang, but `raco make --disable-inline` will succeed.
>>
>> That's also why `--timeout` didn't help, because it seems to wait for
>> compilation to have any effect.
>>
>> Sam
>>
>> On Tue, Jul 14, 2015 at 6:31 AM Ryan Davis <zenspi...@gmail.com> wrote:
>>>
>>> I'm tired and not thinking straight, but we just finished running the
>>> schemer gauntlet and I decided to dip my toes into the 6.2 release. I can't
>>> get it to run my tests and I need external validation that it's not me doing
>>> something stupid.
>>>
>>>   git clone https://github.com/searbsg/little-schemer
>>>   cd little-schemer/zenspider
>>>   raco test --direct ch*.rkt
>>>
>>> For me, it hangs hard on ch09.rkt, ch10.rkt, and some combo of ch11.rkt
>>> and beyond. I can run all of ch2*.rkt just fine.
>>>
>>> Additionally, it appears that `raco test --timeout` wasn't fixed after I
>>> reported it last time. I thought commits went it to address it. --heartbeat
>>> also appears to do nothing when run against these tests.
>>>
>>> Under the previous racket release:
>>>
>>> 10028 % rake test
>>> time raco test --direct ch*.rkt
>>> raco test: "ch00.rkt"
>>> raco test: (submod "ch01.rkt" test)
>>> raco test: (submod "ch02.rkt" test)
>>> raco test: (submod "ch03.rkt" test)
>>> raco test: (submod "ch04.rkt" test)
>>> raco test: (submod "ch05.rkt" test)
>>> raco test: (submod "ch06.rkt" test)
>>> raco test: (submod "ch07.rkt" test)
>>> raco test: (submod "ch08.rkt" test)
>>> raco test: (submod "ch09.rkt" test)
>>> raco test: (submod "ch10.rkt" test)
>>> raco test: (submod "ch11.rkt" test)
>>> raco test: (submod "ch12.rkt" test)
>>> raco test: (submod "ch13.rkt" test)
>>> raco test: (submod "ch14.rkt" test)
>>> raco test: (submod "ch15.rkt" test)
>>> raco test: (submod "ch16.rkt" test)
>>> raco test: (submod "ch17.rkt" test)
>>> raco test: (submod "ch18.rkt" test)
>>> raco test: (submod "ch19.rkt" test)
>>> raco test: (submod "ch20.rkt" test)
>>> raco test: (submod "ch21.rkt" test)
>>> raco test: (submod "ch22.rkt" test)
>>> raco test: (submod "ch23.rkt" test)
>>> raco test: (submod "ch24.rkt" test)
>>> raco test: (submod "ch25.rkt" test)
>>> raco test: (submod "ch26.rkt" test)
>>> raco test: (submod "ch27.rkt" test)
>>> raco test: (submod "ch29.rkt" test)
>>> raco test: (submod "ch30.rkt" test)
>>> 'done
>>> 909 tests passed
>>>
>>> real    0m3.482s
>>> user    0m3.091s
>>> sys     0m0.354s
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Racket Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to racket-users+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Racket Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to racket-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to