RFR: 8080775: Better argument formatting for assert() and friends
david.lindholm at oracle.com
Thu Sep 24 08:48:05 UTC 2015
On 2015-09-23 20:36, Kim Barrett wrote:
> On Sep 23, 2015, at 5:37 AM, David Lindholm <david.lindholm at oracle.com> wrote:
>>> 1712 assert(ic->is_clean(), "nmethod " PTR_FORMAT "not clean %s", from, from->method()->name_and_sig_as_C_string());
>>> 2543 fatal("nmethod at " INTPTR_FORMAT " not in zone", this);
>>> 2551 fatal("findNMethod did not find this nmethod (" INTPTR_FORMAT ")", this);
>>> 2556 tty->print_cr("\t\tin nmethod at " INTPTR_FORMAT " (pcs)", this);
>>> Pre-existing: Don't we need the p2i() dance for the values associated
>>> with the [INT]PTR_FORMAT directives? The last isn't touched by your
>>> changes, but happens to be nearby.
>> You are correct, but this file (and many others) silences GCC warnings for format strings with PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC at the top of the file. This should absolutely be fixed in all these files, but fixing all these is a major task, and nothing I want to do in this change.
> Thanks for the explanation. And I see there are already some relevant
> bug reports, though I didn't see any covering the code directory.
I have assigned these bug reports to me now, and I intend to fix all of
them regardless of directory.
>> I think I'll wait for the rest of your comments before sending out a new webrev.
> Great. I'll try to finish up soon.
More information about the hotspot-dev