https://issues.dlang.org/show_bug.cgi?id=12863

Denis Shelomovskij <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
           Hardware|x86_64                      |All
         Resolution|---                         |INVALID
                 OS|Mac OS X                    |All

--- Comment #1 from Denis Shelomovskij <[email protected]> ---
`Select` constructor is typesafe variadic function so `projection` array may be
constructed on stack and thus contains garbage after function returns, casting
this garbage to `Node` fails somewhere in D runtime.

To fix the code replace
---
this.projection = projection;
---
with
---
this.projection = projection.dup; // `dup` is added
---


P.S.
One should be aware of typesafe variadic functions danger and carefully read
docs [1].

[1] http://dlang.org/function.html

--

Reply via email to