Is it possible to add some kind of PIKE_DEBUG-enabled code in get_all_args that detects these kinds of problems?
We've been talking about a noop preprocessor that applies additional compilation checks before. Additional sprintf checks lands in the same area.