Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-16104

Valgrind's definite memory leaks are not displayed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Qt Creator 3.6.1
    • None
    • System: Host: arch Kernel: 4.4.7-1-lts x86_64 (64 bit)
                 Desktop: Cinnamon 2.8.8 Distro: Arch Linux

    Description

      Created the following example code as a CMake C project:

      #include <stdio.h>
      #include <stdlib.h>
      
      int main(int argc, char *argv[])
      {
          int * foo = malloc (100);
          return 0;
      }
      

      Valgrind returns the following error message:

      100 bytes in 1 blocks are definitely lost in loss record 1 of 1
        in main in /home/marcin/proj/foobar/main.c:6
        1: malloc in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
        2: main in /home/marcin/proj/foobar/main.c:6
      

      Unfortunately, it's not shown by default, one has to enable external errors (once after Qt Creator is launched)

      After enabling external errors, all the needed messages are shown

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            marmistrz Marcin Mielniczuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes