implement PR17059: more visible diagnostics for stack-buffer-overflow