Fun with NULL pointers, part 2
Fun with NULL pointers, part 2
Posted Jul 22, 2009 16:03 UTC (Wed) by brianomahoney (guest, #6206)In reply to: Fun with NULL pointers, part 2 by dgm
Parent article: Fun with NULL pointers, part 2
This bug happened because the author wrote patently idiotic code, using a pointer and THEN checking it. This code, and all others like it need to be fixed so it actually does what it is intended to do. We do not need the kernel full of ah, well, but checks and other kruft.
The secondary, and very worrying thing is GCC silently dropping the check, we do not need optimizations like that without a STRONG warning, but I guess the motivations of the GCC developers are different here, and they really cannot win, there is constant pressure to improve compiled code and not to introduce more baby-minding warnings.
Perhaps COVERTY can help here, but we need more and better analysis, and focused bug-fixing bu good developers not the injection of confused well meaning tests.
