On 07/25/2012 01:12 PM, Alan Cox wrote:
>> I wonder how many such bugs a memzero()/bzero() will prevent.
> 
> If the compiler-foo is possible with gcc then a 0 length constant
> memset warning and a warning if the set value is > 255 would both
> probably be useful.

It's pretty easy with BUILD_BUG_ON(), unfortunately that emits an error
and there may be legitimate uses for memset(p, 255, 0).

> Fortunately a lot of other validation/verification tools do pick it up
> already.

Also a lot of kernel developers whose time would be better spent on
other things.

-- 
error compiling committee.c: too many arguments to function


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to