News for hackers. Stuff that matters.
Re:WebAssembly doesn’t make unsafe languages safe by devit on Sunday November 25, 2018 @05:14PM (#18529407)
Setting NULL or nullptr to any value other than 0 is highly likely to break most complex C/C++ codebases.
Re:WebAssembly doesn’t make unsafe languages safe by cyphar on Sunday November 25, 2018 @08:32PM (#18530334)
Even simple codebases that do

    if (!p)
Anywhere would immediately cause problems.
Re:WebAssembly doesn’t make unsafe languages safe by saagarjha on Sunday November 25, 2018 @09:29PM (#18530587)
This is legal in C, even if the representation for a null pointer is not actually "all zero bits" internally. The null pointer is defined to compare equal to 0, which is the contrapositive of what your test is doing.