> what problem are you trying to solve?
> 
> the limit would check only that the right number of
> argument bytes are consumed, but not that they are
> interpreted correctly.  print("%s %d", 1, "hello") would
> still crash, as would print("%s", 1, "hello").
> 
> #pragma varargck is more precise and can be
> done at compile time instead of needing to wait
> until the code trips at run time.

varargck is very effective.  but it only works if the pragma
is used.  (i count 47 functions with ... in /sys/include and
only 27 #pragma varargck argpos.)   and it only works with
functions taking print verbs.  anyone else, is out-of-luck.
for example, the stdio functions.

here are some functions that don't appear to have varargck
that likely should:

auth_wep
ctlerror
hfail
vtDebug
vtFatal
threadsetname
vtlogprint
vtlog

- erik

Reply via email to