Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8337458

Remove debugging code print_cpool_bytes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 24
    • hotspot
    • b07

      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 by JDK-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).

            coleenp Coleen Phillimore
            kbarrett Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: