Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame for main() missed in callstack starting in libc #2392

Closed
charles-randall opened this issue Mar 18, 2021 · 19 comments · Fixed by #2431
Closed

Frame for main() missed in callstack starting in libc #2392

charles-randall opened this issue Mar 18, 2021 · 19 comments · Fixed by #2431

Comments

@charles-randall
Copy link

I presume that I'm doing something wrong, but this is pretty basic usage following the documentation.

Here's what I'm seeing,

$ cat test.c
#include <stdio.h>

int main(int argc, char *argv[]) {
  char *p;
  printf("p=%s\n", p);
  return 0;
}

My compiler,

$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0

Compiling with -g for debugging info,
$ gcc -g -fno-inline -fno-omit-frame-pointer test.c

Version of DrMemory (it's in the directory name below too),

$ ./DrMemory-Linux-2.3.0-1/bin/drmemory -version
Dr. Memory version 2.3.0 -- build 1


Output from DrMemory without a reference to the source code location in test.c,

$ ./DrMemory-Linux-2.3.0-1/bin/drmemory -- ./a.out
~~Dr.M~~ Dr. Memory version 2.3.0
~~Dr.M~~ 
~~Dr.M~~ Error #1: UNINITIALIZED READ: reading register r11
~~Dr.M~~ # 0 libc.so.6!?                    +0x0      (0x00007fb2960911bf <libc.so.6+0x7a1bf>)
~~Dr.M~~ # 1 libc.so.6!_IO_printf           +0xae     (0x00007fb29607bebf <libc.so.6+0x64ebf>)
~~Dr.M~~ # 2 libc.so.6!__libc_start_main    +0xf2     (0x00007fb29603e0b3 <libc.so.6+0x270b3>)
~~Dr.M~~ # 3 _start
~~Dr.M~~ Note: @0:00:00.329 in thread 891508
~~Dr.M~~ Note: instruction: test   %r11 %r11
p=(null)
~~Dr.M~~ 
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~       0 unique,     0 total unaddressable access(es)
~~Dr.M~~       1 unique,     1 total uninitialized access(es)
~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
~~Dr.M~~       0 unique,     0 total warning(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of leak(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~      14 unique,    17 total,   7706 byte(s) of still-reachable allocation(s)
~~Dr.M~~          (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: /home/cfr/proj/drmemory/DrMemory-Linux-2.3.0-1/drmemory/logs/DrMemory-a.out.891508.000/results.txt

For comparison, Valgrind points to the source line in test.c,

$ valgrind ./a.out
==892836== Memcheck, a memory error detector
==892836== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==892836== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==892836== Command: ./a.out
==892836== 
==892836== Conditional jump or move depends on uninitialised value(s)
==892836==    at 0x48D91C2: __vfprintf_internal (vfprintf-internal.c:1688)
==892836==    by 0x48C3EBE: printf (printf.c:33)
==892836==    by 0x109173: main (test.c:5)
==892836== 
p=(null)
==892836== 
==892836== HEAP SUMMARY:
==892836==     in use at exit: 0 bytes in 0 blocks
==892836==   total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated
==892836== 
==892836== All heap blocks were freed -- no leaks are possible
==892836== 
==892836== Use --track-origins=yes to see where uninitialised values come from
==892836== For lists of detected and suppressed errors, rerun with: -s
==892836== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

@derekbruening
Copy link
Contributor

It looks like the problem is not lack of line number information, but skipping the main frame. PR #2371 recently fixed a callstack issue: does the latest Dr. Memory https://github.com/DynamoRIO/drmemory/releases/tag/cronbuild-2.3.18665 find main? Or the same fix can be accomplished in 2.3.0 by passing -callstack_max_scan 4096.

@charles-randall
Copy link
Author

Nope.

Compile,
$ gcc -g -fno-inline -fno-omit-frame-pointer test.c

Run DrMemory,

$ ./DrMemory-Linux-2.3.18665/bin/drmemory -- ./a.out
~~Dr.M~~ Dr. Memory version 2.3.18665
~~Dr.M~~ 
~~Dr.M~~ Error #1: UNINITIALIZED READ: reading register r11
~~Dr.M~~ # 0 libc.so.6!?                    +0x0      (0x00007f9af6d841bf <libc.so.6+0x7a1bf>)
~~Dr.M~~ # 1 libc.so.6!_IO_printf           +0xae     (0x00007f9af6d6eebf <libc.so.6+0x64ebf>)
~~Dr.M~~ # 2 libc.so.6!__libc_start_main    +0xf2     (0x00007f9af6d310b3 <libc.so.6+0x270b3>)
~~Dr.M~~ # 3 _start
~~Dr.M~~ Note: @0:00:00.284 in thread 1201774
~~Dr.M~~ Note: instruction: test   %r11 %r11
p=(null)
~~Dr.M~~ 
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~       0 unique,     0 total unaddressable access(es)
~~Dr.M~~       1 unique,     1 total uninitialized access(es)
~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
~~Dr.M~~       0 unique,     0 total warning(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of leak(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~      14 unique,    17 total,   7706 byte(s) of still-reachable allocation(s)
~~Dr.M~~          (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.1201774.000/results.txt

@charles-randall
Copy link
Author

As a guess, I also tried with -callstack_max_scan 8192 and -callstack_max_scan 16384 with no change.

@derekbruening
Copy link
Contributor

Please try the various callstack options to see if any of them fix the issue: e.g., -no_callstack_use_top_fp

@charles-randall
Copy link
Author

Tried the following one-at-a-time with 2.3.18665 and observed no change,

-callstack_use_top_fp
-callstack_use_top_fp_selectively
-callstack_use_fp
-callstack_use_fp

Starting back at the beginning, the README says to compile with '-m32' (doesn't work on my system) but the web page does not,

https://dynamorio.org/drmemory_docs/page_prep.html#sec_prep_linux

So I didn't compile with -m32. More details on my gcc if that matters,

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-HskZEa/gcc-9-9.3.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) 


@derekbruening
Copy link
Contributor

Some of those options are already on by default. Please try -no_callstack_use_top_fp.

@charles-randall
Copy link
Author

Ugh. Sorry. Tried that first, but missed it in the list. No change.

$ ./DrMemory-Linux-2.3.18665/bin/drmemory -no_callstack_use_top_fp -- ./a.out
~~Dr.M~~ Dr. Memory version 2.3.18665
~~Dr.M~~ 
~~Dr.M~~ Error #1: UNINITIALIZED READ: reading register r11
~~Dr.M~~ # 0 libc.so.6!?                    +0x0      (0x00007fdf848b41bf <libc.so.6+0x7a1bf>)
~~Dr.M~~ # 1 libc.so.6!_IO_printf           +0xae     (0x00007fdf8489eebf <libc.so.6+0x64ebf>)
~~Dr.M~~ # 2 libc.so.6!__libc_start_main    +0xf2     (0x00007fdf848610b3 <libc.so.6+0x270b3>)
~~Dr.M~~ # 3 _start
~~Dr.M~~ Note: @0:00:00.293 in thread 1215176
~~Dr.M~~ Note: instruction: test   %r11 %r11
p=(null)
~~Dr.M~~ 
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~       0 unique,     0 total unaddressable access(es)
~~Dr.M~~       1 unique,     1 total uninitialized access(es)
~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
~~Dr.M~~       0 unique,     0 total warning(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of leak(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~      14 unique,    17 total,   7706 byte(s) of still-reachable allocation(s)
~~Dr.M~~          (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.1215176.000/results.txt

@derekbruening
Copy link
Contributor

One more try: -no_callstack_use_top_fp -no_callstack_use_fp -callstack_max_scan 4096?

Of course that should not be necessary; callstacks in some shared libraries have been a challenge in some situations. Here we have FPO in multiple frames and the build options of the executable seemingly do not come into play as likely once on a false chain the skip over main would happen no matter the a.out layout if it only depends on the libc behavior.

@charles-randall
Copy link
Author

Nope. Any additional logging I can enable?

$ ./DrMemory-Linux-2.3.18665/bin/drmemory -no_callstack_use_top_fp -no_callstack_use_fp -callstack_max_scan 4096 -- ./a.out
~~Dr.M~~ Dr. Memory version 2.3.18665
~~Dr.M~~ 
~~Dr.M~~ Error #1: UNINITIALIZED READ: reading register r11
~~Dr.M~~ # 0 libc.so.6!?                    +0x0      (0x00007f89b36291bf <libc.so.6+0x7a1bf>)
~~Dr.M~~ # 1 libc.so.6!_IO_printf           +0xae     (0x00007f89b3613ebf <libc.so.6+0x64ebf>)
~~Dr.M~~ # 2 libc.so.6!__libc_start_main    +0xf2     (0x00007f89b35d60b3 <libc.so.6+0x270b3>)
~~Dr.M~~ # 3 _start
~~Dr.M~~ Note: @0:00:00.284 in thread 1231067
~~Dr.M~~ Note: instruction: test   %r11 %r11
p=(null)
~~Dr.M~~ 
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~       0 unique,     0 total unaddressable access(es)
~~Dr.M~~       1 unique,     1 total uninitialized access(es)
~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
~~Dr.M~~       0 unique,     0 total warning(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of leak(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~      14 unique,    17 total,   7706 byte(s) of still-reachable allocation(s)
~~Dr.M~~          (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.1231067.000/results.txt

@derekbruening
Copy link
Contributor

Nope. Any additional logging I can enable?

E.g., -verbose 4 -callstack_dump_stack 2048

@derekbruening derekbruening changed the title No source code line numbers on linux? Frame for main() missed in callstack starting in libc Mar 19, 2021
@derekbruening
Copy link
Contributor

I found a Linux machine where I could reproduce the original issue. For 64-bit, -no_callstack_use_top_fp -no_callstack_use_fp -callstack_max_scan 4096 resolves it. 32-bit is not currently on the machine and conflicts w/ some cross-compilation packages so did not try it at this time.

@charles-randall
Copy link
Author

Logs attached as zip.

Compile,

$ gcc -g -fno-inline -fno-omit-frame-pointer test.c

Run DrMemory,

$ ./DrMemory-Linux-2.3.18665/bin/drmemory -verbose 4 -callstack_dump_stack 2048 -- ./a.out
~~Dr.M~~ Dr. Memory version 2.3.18665
~~Dr.M~~ options are "`-verbose` `4` `-callstack_dump_stack` `2048` -logdir `/home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs` -symcache_dir `/home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/symcache` -resfile 1330648 "
~~Dr.M~~ log dir is /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.1330648.000
~~Dr.M~~ 
~~Dr.M~~ Error #1: UNINITIALIZED READ: reading register r11
~~Dr.M~~ # 0 libc.so.6!?                    +0x0      (0x00007fdc386bf1bf <libc.so.6+0x7a1bf>)
~~Dr.M~~ # 1 libc.so.6!_IO_printf           +0xae     (0x00007fdc386a9ebf <libc.so.6+0x64ebf>)
~~Dr.M~~ # 2 libc.so.6!__libc_start_main    +0xf2     (0x00007fdc3866c0b3 <libc.so.6+0x270b3>)
~~Dr.M~~ # 3 _start
~~Dr.M~~ Note: @0:00:00.283 in thread 1330648
~~Dr.M~~ Note: instruction: test   %r11 %r11
p=(null)
~~Dr.M~~ 
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~       0 unique,     0 total unaddressable access(es)
~~Dr.M~~       1 unique,     1 total uninitialized access(es)
~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
~~Dr.M~~       0 unique,     0 total warning(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of leak(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~      14 unique,    17 total,   7706 byte(s) of still-reachable allocation(s)
~~Dr.M~~          (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.1330648.000/results.txt
[logs.zip](https://github.com/DynamoRIO/drmemory/files/6173576/logs.zip)

@charles-randall
Copy link
Author

I found a Linux machine where I could reproduce the original issue. For 64-bit, -no_callstack_use_top_fp -no_callstack_use_fp -callstack_max_scan 4096 resolves it. 32-bit is not currently on the machine and conflicts w/ some cross-compilation packages so did not try it at this time.

No for me,

$ ./DrMemory-Linux-2.3.18665/bin/drmemory -no_callstack_use_top_fp -no_callstack_use_fp -callstack_max_scan 4096 -- ./a.out
~~Dr.M~~ Dr. Memory version 2.3.18665
~~Dr.M~~ 
~~Dr.M~~ Error #1: UNINITIALIZED READ: reading register r11
~~Dr.M~~ # 0 libc.so.6!?                    +0x0      (0x00007f1ab27d01bf <libc.so.6+0x7a1bf>)
~~Dr.M~~ # 1 libc.so.6!_IO_printf           +0xae     (0x00007f1ab27baebf <libc.so.6+0x64ebf>)
~~Dr.M~~ # 2 libc.so.6!__libc_start_main    +0xf2     (0x00007f1ab277d0b3 <libc.so.6+0x270b3>)
~~Dr.M~~ # 3 _start
~~Dr.M~~ Note: @0:00:00.286 in thread 1332588
~~Dr.M~~ Note: instruction: test   %r11 %r11
p=(null)
~~Dr.M~~ 
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~       0 unique,     0 total unaddressable access(es)
~~Dr.M~~       1 unique,     1 total uninitialized access(es)
~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
~~Dr.M~~       0 unique,     0 total warning(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of leak(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~      14 unique,    17 total,   7706 byte(s) of still-reachable allocation(s)
~~Dr.M~~          (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.1332588.000/results.txt

@derekbruening
Copy link
Contributor

Sorry also needs to be debug build: -debug -verbose 4 -callstack_dump_stack 2048

@charles-randall
Copy link
Author

Assuming that you meant to combine the last two option recommendations... Nope.


$ ./DrMemory-Linux-2.3.18665/bin/drmemory -debug -verbose 4 -callstack_dump_stack 2048 -no_callstack_use_top_fp -no_callstack_use_fp -callstack_max_scan 4096 -- ./a.out
~~Dr.M~~ Dr. Memory version 2.3.18665
~~Dr.M~~ options are "`-verbose` `4` `-callstack_dump_stack` `2048` `-no_callstack_use_top_fp` `-no_callstack_use_fp` `-callstack_max_scan` `4096` -logdir `/home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs` -symcache_dir `/home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/symcache` -resfile 1344436 "
~~Dr.M~~ log dir is /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.1344436.000
~~Dr.M~~ 
~~Dr.M~~ Error #1: UNINITIALIZED READ: reading register r11
~~Dr.M~~ # 0 libc.so.6!?                    +0x0      (0x00007f7a07a4b1bf <libc.so.6+0x7a1bf>)
~~Dr.M~~ # 1 libc.so.6!_IO_printf           +0xae     (0x00007f7a07a35ebf <libc.so.6+0x64ebf>)
~~Dr.M~~ # 2 libc.so.6!__libc_start_main    +0xf2     (0x00007f7a079f80b3 <libc.so.6+0x270b3>)
~~Dr.M~~ # 3 _start
~~Dr.M~~ Note: @0:00:15.804 in thread 1344436
~~Dr.M~~ Note: instruction: test   %r11 %r11
p=(null)
~~Dr.M~~ 
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~       0 unique,     0 total unaddressable access(es)
~~Dr.M~~       1 unique,     1 total uninitialized access(es)
~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
~~Dr.M~~       0 unique,     0 total warning(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of leak(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~      14 unique,    17 total,   7706 byte(s) of still-reachable allocation(s)
~~Dr.M~~          (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.1344436.000/results.txt

Additional system info if it helps,


$ hostnamectl
   Static hostname: cfr-ThinkPad-T450s
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 5bdb81816d4448e8a82c749b84c745b3
           Boot ID: cea2460e3c0a402caeb1673d7ea08e8d
  Operating System: Ubuntu 20.04.2 LTS
            Kernel: Linux 5.4.0-67-generic
      Architecture: x86-64

$ uname -a
Linux cfr-ThinkPad-T450s 5.4.0-67-generic #75-Ubuntu SMP Fri Feb 19 18:03:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

@derekbruening
Copy link
Contributor

Assuming that you meant to combine the last two option recommendations... Nope.

I mean for useful logs it needs -debug

@charles-randall
Copy link
Author

I'm confused. Can you please provide the full list of options you want me to run with this time?

@derekbruening
Copy link
Contributor

I'm confused. Can you please provide the full list of options you want me to run with this time?

Sorry for any confusion. Earlier you provided a logs zip file, but the logs are rather sparse because it was release build rather than debug build. I was requesting a new logs zip file with a run that includes -debug, so -debug -verbose 4 -callstack_dump_stack 2048.

@charles-randall
Copy link
Author

No problem. Run below. Logs attached.

$ ./DrMemory-Linux-2.3.18665/bin/drmemory -debug -verbose 4 -callstack_dump_stack 2048 -- ./a.out
~~Dr.M~~ Dr. Memory version 2.3.18665
~~Dr.M~~ options are "`-verbose` `4` `-callstack_dump_stack` `2048` -logdir `/home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs` -symcache_dir `/home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/symcache` -resfile 2778788 "
~~Dr.M~~ log dir is /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.2778788.000
~~Dr.M~~ 
~~Dr.M~~ Error #1: UNINITIALIZED READ: reading register r11
~~Dr.M~~ # 0 libc.so.6!?                    +0x0      (0x00007fcaea76f1bf <libc.so.6+0x7a1bf>)
~~Dr.M~~ # 1 libc.so.6!_IO_printf           +0xae     (0x00007fcaea759ebf <libc.so.6+0x64ebf>)
~~Dr.M~~ # 2 libc.so.6!__libc_start_main    +0xf2     (0x00007fcaea71c0b3 <libc.so.6+0x270b3>)
~~Dr.M~~ # 3 _start
~~Dr.M~~ Note: @0:00:15.975 in thread 2778788
~~Dr.M~~ Note: instruction: test   %r11 %r11
p=(null)
~~Dr.M~~ 
~~Dr.M~~ ERRORS FOUND:
~~Dr.M~~       0 unique,     0 total unaddressable access(es)
~~Dr.M~~       1 unique,     1 total uninitialized access(es)
~~Dr.M~~       0 unique,     0 total invalid heap argument(s)
~~Dr.M~~       0 unique,     0 total warning(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of leak(s)
~~Dr.M~~       0 unique,     0 total,      0 byte(s) of possible leak(s)
~~Dr.M~~ ERRORS IGNORED:
~~Dr.M~~      14 unique,    17 total,   7706 byte(s) of still-reachable allocation(s)
~~Dr.M~~          (re-run with "-show_reachable" for details)
~~Dr.M~~ Details: /home/cfr/proj/drmemory/DrMemory-Linux-2.3.18665/drmemory/logs/DrMemory-a.out.2778788.000/results.txt

logs.zip

derekbruening added a commit that referenced this issue Oct 17, 2021
Updates DR to 53af6c7 for the new drcallstack library.

Adds a new option -callstack_use_unwind which is on by default for
Linux.  This uses drcallstack's libunwind-based callstack walk, which
fixes problems of missing frames.  If the starting PC is not in a
module, the old callstack walking is used.

Updates malloc replacement contexts to include the PC as of the same
point as the captured stack pointer, for proper libunwind input.

Issue: #823, #2399, #2392, #1222
Fixes #2392
derekbruening added a commit that referenced this issue Oct 18, 2021
Updates DR to 53af6c7 for the new drcallstack library.

Adds a new option -callstack_use_unwind which is on by default for
Linux.  This uses drcallstack's libunwind-based callstack walk, which
fixes problems of missing frames.  If the starting PC is not in a
module, the old callstack walking is used.

Updates malloc replacement contexts to include the PC as of the same
point as the captured stack pointer, for proper libunwind input.

Issue: #823, #2399, #2392, #1222
Fixes #2392
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants