Original title print_cpool_bytes unnecessarily flushes all streams.
The function print_cpool_bytes (in constantPool.cpp) makes multiple calls to printf, and at the end calls fflush. That fflush call used to have an argument of 0, which was changed to nullptr byJDK-8337416. That change was made to remove a possible -Wzero-used-as-null-pointer-constant warning, since the argument type is FILE*. So changing to nullptr maintained the existing behavior, of fflush'ing all streams. However, it is likely that the intended behavior here is to just flush stdout, and 0 was being incorrectly used for that. Probably it should be using fflush(stdout).
The function print_cpool_bytes (in constantPool.cpp) makes multiple calls to printf, and at the end calls fflush. That fflush call used to have an argument of 0, which was changed to nullptr by
- relates to
-
JDK-8337416 Fix -Wzero-as-null-pointer-constant warnings in misc. runtime code
- Resolved
- links to
-
Commit(master) openjdk/jdk/86a8b48b
-
Review(master) openjdk/jdk/23222