More range woes: composed ranges are unsafe to return from functions

Marco Leise Marco.Leise at gmx.de
Thu Oct 18 19:24:53 PDT 2012


Am Tue, 16 Oct 2012 17:28:47 -0700
schrieb "H. S. Teoh" <hsteoh at quickfur.ath.cx>:

> On Tue, Oct 16, 2012 at 09:47:36PM +0200, jerro wrote:
> > >Hmm. There *is* a delegate being passed to map(). Would that cause
> > >problems? Theoretically it shouldn't, but as you said, if dmd
> > >isn't
> > >handling it correctly that could cause problems.
> > 
> > I'm looking at the disassembly of cprod
> > (http://pastebin.com/ngTax6B8) and there doesn't seem to be a call
> > to _d_allocmemory in it. AFAIK it should be if the memory for the
> > variables that the delegate uses was allocated on the heap?
> 
> Filed bug:
> 
> 	http://d.puremagic.com/issues/show_bug.cgi?id=8832
> 
> Whew, what a day! Two compiler bugs, no less, and a whole bunch of
> Phobos issues. I think I may need to take a break from D for a day or
> two. :-/
> 
> 
> T
> 

And that's where all the good projects end... :D

-- 
Marco



More information about the Digitalmars-d mailing list