Question Regarding Fixing A Bug [Issue 23654]

Walter Bright newshound2 at digitalmars.com
Sun Aug 27 02:41:43 UTC 2023


On 8/26/2023 1:22 PM, kdevel wrote:
> In January 2023 I reported a bug in [execv_: toAStringz: memory 
> corruption](https://issues.dlang.org/show_bug.cgi?id=23654), provided a fix and 
> had a discussion [std.process: memory allocation with malloc in 
> execv_](https://forum.dlang.org/post/oeyisfsffcijzwlwcpaj@forum.dlang.org).
> 
> That bug seems to be in the codebase for seven years, represents a regression, 
> and has priority 1. But it is still unpatched.
> 
> If I read the discussion correctly Steven asked for disabling the GC before the 
> arguments of the call to `exec*` are set up. I strongly disliked that because 
> disabling the GC is useless in most of the cases (invocations) because the 
> collector does not run anyway. There are no "cycles saved" by disabling the 
> collector.
> 
> Disabling the GC and re-enabling it in a scope guard unnecessarily complicates 
> the code.
> 
> If there is a misconception on my side, e.g. "most new allocation do not invoke 
> the collector", I would appreciate a pointer to some documentation.


Can you please turn your patch into a Pull Request on github:

https://github.com/dlang/phobos

? Probably nobody had noticed the patch in bugzilla.


More information about the Digitalmars-d mailing list