Question Regarding Fixing A Bug [Issue 23654]

kdevel kdevel at vogtner.de
Sat Aug 26 20:22:09 UTC 2023


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.





More information about the Digitalmars-d mailing list