"Your statement is 100% correct but misses the entire point"

jeckel jeckel12381236 at gmail.com
Tue Apr 14 15:48:23 UTC 2020


On Tuesday, 14 April 2020 at 15:39:00 UTC, Adam D. Ruppe wrote:
> On Tuesday, 14 April 2020 at 15:31:04 UTC, jeckel wrote:
>> I've had to deal with memory corruption bugs in D caused by 
>> the GC because it was freeing something even though it was 
>> still being used.
>
> Was that an internal D GC bug or was it something you could fix 
> with addRoot function calls in your code?
>
> I've had the latter myself - indeed it was a fun time. In my 
> case I was passing a pointer to an object through a self-pipe. 
> While the object sat in the kernel buffer, after write(), but 
> before read(), the GC reaped it. Yikes.

It was an internal D GC bug, I think it had something to with 
TLS/static variables not being tracked properly. Which made it 
even more fun to try and figure out what was going on.




More information about the Digitalmars-d mailing list