this should not be necessary - the invalid bit patterns cannot be created except through type punning. however, some broken gnu software is passing them to printf and triggering dangerous stack-smashing, so let's catch them anyway...