Compiler printf format checking
john.r.rose at oracle.com
Wed Dec 11 15:06:03 PST 2013
On Dec 11, 2013, at 2:41 PM, Dmitry Samersoff <dmitry.samersoff at oracle.com> wrote:
> we can just use %p on all platforms
I do think we need to use an off-the-shelf static analyzer for the format strings. There is only a tiny amount of room to maneuver within the confines of the language of printf format strings.
There are probably several other fiddly details like this, such as "how do I format intptr_t" and "how do I format jlong" and maybe "how do I format an oop". It may be possible to do some dodges like %p to get around those also. (The [-+#] modifiers look tantalizing to me in this regard.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-runtime-dev