Issue 7965 - Invalid outer function scope pointer in some cases

Era Scarecrow rtcvb32 at yahoo.com
Sat Jun 16 14:19:23 PDT 2012


On Saturday, 16 June 2012 at 20:16:52 UTC, Denis Shelomovskij 
wrote:
> Just want to mention again that Issue 7965 is a really nasty 
> wrong-code bug that is difficult to find unless you know about 
> it.
>
> I face this Issue in almost every my D program with non-trivial 
> std.algorithm usage and I suppose I'm not alone.
>
> If there is no plans to fix it in near future this _must_ be 
> mentioned in std.algorithm page and in other places in docs 
> because it's really possible to avoid it every time you use 
> std.algorithm.
>
> It's not a joke! Such things must be mentioned in docs or D is 
> unusable for non-experienced D developers.
>
> http://d.puremagic.com/issues/show_bug.cgi?id=7965

  Looks to me like a frame pointer bug for the delegate (Or lack 
of it?)...

  Based on the setup, it should also be illegal to pass the struct 
outside of the scope it's in due to the delegate in the struct 
(Unless the variable(s) in question are static).


More information about the Digitalmars-d mailing list