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

--- Comment #1 from kdevel <kde...@vogtner.de> ---
(In reply to kdevel from comment #0)
> private void toAStringz(in string[] a, const(char)**az)
> {
>     import std.string : toStringz;
>     foreach (string s; a)
>     {
>         *az++ = toStringz(s);
>     }
>     *az = null; 

>     auto argv_ = cast(const(char)**)core.stdc.stdlib.malloc((char*).sizeof *
> (1 + argv.length));

It seems to be GC-related. The unittest passes, if

   - the GC is disabled, or
   - the memory is allocated with new:

$ dmd -checkaction=context -unittest -main -run tassnd-no-gc.d     
8192
16384
32768
65536
131072
1 modules passed unittests
$ dmd -checkaction=context -unittest -main -run tassnd-no-malloc.d 
8192
16384
32768
65536
131072
1 modules passed unittests

--

Reply via email to