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

libproc_impl.c previous_thr may be used uninitialized warning

    Details

    • Subcomponent:
    • Resolved In Build:
      b11
    • CPU:
      generic
    • OS:
      linux

      Backports

        Description

        When building with gcc7 on linux x86_64, and trying out different optimization options, I run into this error when
        optimizing for space (-Os) :

        /open_jdk/jdk_5/jdk/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c: In function 'delete_thread_info':
        /open_jdk/jdk_5/jdk/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c:285:26: error: 'previous_thr' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               previous_thr->next = current_thr->next;
               ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~

        We should probably better initialize previous_thr to avoid this warning.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mbaesken Matthias Baesken
                  Reporter:
                  mbaesken Matthias Baesken
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: