Movement against float.init being nan

Walter Bright newshound2 at digitalmars.com
Fri Aug 26 18:30:16 UTC 2022


On 8/26/2022 9:28 AM, Steven Schveighoffer wrote:
> I fully don't ever expect any changes to come from this discussion.

True. I don't believe I've ever managed to change your mind!

> That's great. Now how do you find out where the problem starts?

The most important part is discovering that I *have* a problem.

Next, I grep for DEADBEEF in the source code. And go from there.

I am not making this up for the n.g. I have a *lot* of experience with it. I'm 
pointing out techniques that work. DEADBEEF turns a heisenbug into a 
reproducible bug. If it is reproducible, it is findable and fixable.


> What if DEADBEEF 
> is in your dump, but it's just memory that isn't being used yet? Is it still a 
> problem?

That depends on how you were using it.


> Note that this solves a mostly different problem -- using dangling pointers. 
> This isn't about initialization.

It is. The first use case I mentioned was initializing data returned from malloc 
to DEADBEEF. malloc returns uninitialized data, and I wanted to make sure it 
wasn't data that just happened to be 0 and "work", because therein lies 
heisenbugs and madness.



More information about the Digitalmars-d mailing list