Defense against a class of programming bugs