Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3501

ASAN produces useless stack traces

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Some issue in configure.ac or Makefile.am.

      In the related issue, a memory leak was found in simulate_mode.c. ASAN stack trace is useless while valgrind works.

      $ ./autogen.sh --enable-debug
      $ make CFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address"
      $ sudo make install
      $ sudo /var/cfengine/bin/cf-agent -KI test.cf --simulate=diff
       warning: All changes in files will be made in the '/var/cfengine/state/5989.changes' chroot
          info: Updated content of '/tmp/hello-world' with content 'Hello, world!
      '
       warning: No action was requested for file '/tmp/hello-world'. Maybe a typo in the policy?
          info: files promise '/tmp/hello-world' repaired
          info: Showing diff for changed files (in the changes chroot)
      ===========================================================================
      --- original /tmp/hello-world
      +++ changed  /tmp/hello-world
      @@ -1 +1 @@
      -Some data
      +Hello, world!
      
      =================================================================
      ==5989==ERROR: LeakSanitizer: detected memory leaks
      
      Direct leak of 168 byte(s) in 1 object(s) allocated from:
          #0 0x557550beba2e in __interceptor_realloc (/var/cfengine/bin/cf-agent+0x12ba2e)
          #1 0x7f57280a5d88  (/lib/x86_64-linux-gnu/libc.so.6+0x8ed88)
      
      SUMMARY: AddressSanitizer: 168 byte(s) leaked in 1 allocation(s).
      

      Reintroduce the memory leak to reproduce the bad stack trace.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                olehermanse Ole Herman Schumacher Elgesem
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Summary Panel