RFR: 8080775: Better argument formatting for assert() and friends (original) (raw)

Kim Barrett kim.barrett at oracle.com
Wed Sep 23 18:36:12 UTC 2015


On Sep 23, 2015, at 5:37 AM, David Lindholm <david.lindholm at oracle.com> wrote:

src/share/vm/code/nmethod.cpp 1712 assert(ic->isclean(), "nmethod " PTRFORMAT "not clean %s", from, from->method()->nameandsigasCstring()); ... 2543 fatal("nmethod at " INTPTRFORMAT " not in zone", this); ... 2551 fatal("findNMethod did not find this nmethod (" INTPTRFORMAT ")", this); ... 2556 tty->printcr("\t\tin nmethod at " INTPTRFORMAT " (pcs)", this);

Pre-existing: Don't we need the p2i() dance for the values associated with the [INT]PTRFORMAT 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 PRAGMAFORMATMUTEWARNINGSFORGCC 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 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 mailing list