[sanitizer] Add printf format attributes.

These were lost in a refactoring a long time ago.