www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - "Your statement is 100% correct but misses the entire point"

reply 12345swordy <alexanderheistermann gmail.com> writes:
http://nibblestew.blogspot.com/2020/04/your-statement-is-100-correct-but.html?m=1

This is an interesting article to read, given the section 
regarding the GC.
Apr 14 2020
parent reply jeckel <jeckel12381236 gmail.com> writes:
On Tuesday, 14 April 2020 at 14:38:52 UTC, 12345swordy wrote:
 http://nibblestew.blogspot.com/2020/04/your-statement-is-100-correct-but.html?m=1

 This is an interesting article to read, given the section 
 regarding the GC.
It isn't exactly relevant considering how the GC works in D. 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 not fun to track down that the cause was the GC. I've never had to deal with memory corruption bugs caused by the GC in any other (modern) programming languages that use a GC.
Apr 14 2020
parent reply Adam D. Ruppe <destructionator gmail.com> writes:
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.
Apr 14 2020
parent reply jeckel <jeckel12381236 gmail.com> writes:
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.
Apr 14 2020
parent reply Walter Bright <newshound2 digitalmars.com> writes:
On 4/14/2020 8:48 AM, jeckel wrote:
 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.
I'm not aware that was ever a bug in the GC. D's GC has been remarkably reliable.
Apr 14 2020
parent jeckel <jeckel12381236 gmail.com> writes:
On Tuesday, 14 April 2020 at 20:17:16 UTC, Walter Bright wrote:
 On 4/14/2020 8:48 AM, jeckel wrote:
 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.
I'm not aware that was ever a bug in the GC. D's GC has been remarkably reliable.
https://issues.dlang.org/show_bug.cgi?id=15513 Don't think that's even the right one as my issue was on Windows. They definitely exist and there's definitely more than 1!
Apr 15 2020