[Not really OT] Crowdstrike Analysis: It was a NULL pointer from the memory unsafe C++ language.

Nick Treleaven nick at geany.org
Sat Jul 27 09:19:12 UTC 2024


On Saturday, 27 July 2024 at 01:12:09 UTC, Walter Bright wrote:
> The only time a null pointer dereference is an actual problem 
> is when running on a machine that does not have memory 
> protection, which are decades in obsolescence.

I fail to see how this reply relates to Quirin's post. It's just 
a fact that programmers accidentally forget to handle the null 
case *when there is a valid way to handle null*. That is 
obviously a problem because users don't want their programs to 
abort unnecessarily.

That valid way can just skipping the code that needs a 
dereference, or printing an error message, instead of trying to 
dereference null, depending on the situation. You know this. 
There is no single solution to always handle null, because it is 
not a valid address for data (for most programs). Aborting the 
program is fine, if the programmer was aware that a null 
dereference might occur. The problem is they often are not aware, 
even good programmers, because the type system always conflates 
nullability with pointers and programs are complex.

It would be acceptable if you just said that making D null-safe 
was too disruptive. It is not acceptable to deny the problem 
exists.


More information about the Digitalmars-d mailing list