Tricky DMD bug, but I have no idea how to report

JN 666total at wp.pl
Wed Feb 6 22:37:27 UTC 2019


On Wednesday, 6 February 2019 at 22:22:26 UTC, H. S. Teoh wrote:
> Of course, I've no clue whether this is the cause of your 
> problems -- it's just one of many possibilities.  Pointer bugs 
> are nasty things to debug, regardless of whether or not they've 
> been abstracted away in nicer clothing.  I still remember 
> pointer bugs that took literally months just to get a clue on, 
> because it was nigh impossible to track down where they 
> happened -- the symptoms are too far removed from the cause.  
> You pretty much have to take a wild guess and get lucky.
>
> They are just as bad as race condition bugs. (Once, a race 
> condition bug took me almost half a year to fix, because it 
> only showed up in the customer's live environment and we could 
> never reproduce it locally. We knew there was a race somewhere, 
> but it was impossible to locate it. Eventually, by pure 
> accident, an unrelated code change subtly altered the timings 
> of certain things that made the bug more likely to manifest 
> under certain conditions -- and only then were we finally able 
> to reliably reproduce the problem and track down its root 
> cause.)
>
>
> T

I am not sure if it's a pointer bug. What worries me is that it 
breaks at the start of the program, but uncommenting code at the 
end of the program influences it. Unless there's some crazy 
reordering going on, this shouldn't normally have an effect. I 
still believe the bug is on the compiler side, but it's a bit of 
code in my case, and if I try to minimize the case, the issue 
disappears. Oh well.


More information about the Digitalmars-d-learn mailing list