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

Re: [sc-dev] tail call optimization bug.



Sounds familiar to me, but I didn't know tail call
optimization was the cause:

http://www.create.ucsb.edu/pipermail/sc-dev/2004-November/007633.html

hjh

--- James McCartney <asynth@xxxxxx> wrote:

> 
> As a result of the block thread, I've discovered a
> bug in the tail call 
> optimization that I don't know how to solve right
> now, so I am going to 
> turn that off.
> 
> 	tail call optimize has a bug which happens when a
> non local return 
> occurs from a method inside of a tail call optimized
> return.
> 	here's a simple example but there are more subtle
> variations:
> 	mymethod {
> 		^{ ^'ouch' }.value
> 	}
> 	the method gets returned from and then the .value
> method is called, 
> but that then also wants to return and it doesn't
> realize that
> 	the caller has been blown away already, so it tries
> to return to an 
> even higher place on the stack.

=====
____   James Harkins /// dewdrop world
\  /   jamshark70@xxxxxxxxx
 \/    http://www.dewdrop-world.net

"... love and hot pants, peace, harmony..."
  -- Dick Lee, Hot Pants: The Musical