https://bugs.kde.org/show_bug.cgi?id=457860

            Bug ID: 457860
           Summary: Memcheck classifies leaks differently depending on if
                    a C program exits with `return` or `exit`
           Product: valgrind
           Version: 3.18.1
          Platform: Ubuntu Packages
                OS: Linux
            Status: REPORTED
          Severity: minor
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: dylanbbbrot...@gmail.com
  Target Milestone: ---

Memcheck classifies leaks differently depending on if a C program exits with
`return` or `exit`

Given this very simple C program in `test_return.c`
```C
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    double *a = malloc(100);
    return 0;
}
```
The following output is given
```bash
$ gcc -O0 -g test_return.c -o test_return
$ valgrind -s --leak-check=full --show-leak-kinds=all ./test_return
==26141== Memcheck, a memory error detector
==26141== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==26141== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==26141== Command: ./test_return
==26141==
==26141==
==26141== HEAP SUMMARY:
==26141==     in use at exit: 100 bytes in 1 blocks
==26141==   total heap usage: 1 allocs, 0 frees, 100 bytes allocated
==26141==
==26141== 100 bytes in 1 blocks are definitely lost in loss record 1 of 1
==26141==    at 0x4848899: malloc (vg_replace_malloc.c:381)
==26141==    by 0x10915E: main (test_return.c:6)
==26141==
==26141== LEAK SUMMARY:
==26141==    definitely lost: 100 bytes in 1 blocks
==26141==    indirectly lost: 0 bytes in 0 blocks
==26141==      possibly lost: 0 bytes in 0 blocks
==26141==    still reachable: 0 bytes in 0 blocks
==26141==         suppressed: 0 bytes in 0 blocks
==26141==
==26141== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
```

But when given this slightly different program in `test_exit.c`
```C
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    double *a = malloc(100);
    exit(0);
}
```
Instead we get
```bash
$ gcc -O0 -g test_exit.c -o test_exit
$ valgrind -s --leak-check=full --show-leak-kinds=all ./test_exit
==26180== Memcheck, a memory error detector
==26180== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==26180== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==26180== Command: ./test_exit
==26180==
==26180==
==26180== HEAP SUMMARY:
==26180==     in use at exit: 100 bytes in 1 blocks
==26180==   total heap usage: 1 allocs, 0 frees, 100 bytes allocated
==26180==
==26180== 100 bytes in 1 blocks are still reachable in loss record 1 of 1
==26180==    at 0x4848899: malloc (vg_replace_malloc.c:381)
==26180==    by 0x10917E: main (test_exit.c:6)
==26180==
==26180== LEAK SUMMARY:
==26180==    definitely lost: 0 bytes in 0 blocks
==26180==    indirectly lost: 0 bytes in 0 blocks
==26180==      possibly lost: 0 bytes in 0 blocks
==26180==    still reachable: 100 bytes in 1 blocks
==26180==         suppressed: 0 bytes in 0 blocks
==26180==
==26180== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
```

The difference being that with `return` the leak is classifies as "definitely
lost"
but with `exit` the leak is classifies as "still reachable"
even though these programs are identical.

According to section 5.1.2.2.3 of the C specification:

If the return type of the main function is a type compatible with int, a return
from the initial call to the main function is equivalent to calling the exit
function with the value returned by the main function as its argument; [...]

This means that the two above programs should be equivalent and thus behave in
the same manner.

Linux 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64
x86_64 x86_64 GNU/Linux

Full `-v` ouptut
test_exit.c
```
==26307== Memcheck, a memory error detector
==26307== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==26307== Using Valgrind-3.18.1-42b08ed5bd-20211015 and LibVEX; rerun with -h
for copyright info
==26307== Command: ./test_exit
==26307== 
--26307-- Valgrind options:
--26307--    -v
--26307--    -s
--26307--    --leak-check=full
--26307--    --show-leak-kinds=all
--26307-- Contents of /proc/version:
--26307--   Linux version 5.4.72-microsoft-standard-WSL2 (oe-user@oe-host) (gcc
version 8.2.0 (GCC)) #1 SMP Wed Oct 28 23:40:43 UTC 2020
--26307-- 
--26307-- Arch and hwcaps: AMD64, LittleEndian,
amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed
--26307-- Page sizes: currently 4096, max supported 4096
--26307-- Valgrind library directory: /usr/libexec/valgrind
--26307-- Reading syms from /tmp/tmp.wURL71ZPmz/test_exit
--26307-- Reading syms from /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
--26307--   Considering
/usr/lib/debug/.build-id/61/ef896a699bb1c2e4e231642b2e1688b2f1a61e.debug ..
--26307--   .. build-id is valid
--26307-- Reading syms from /usr/libexec/valgrind/memcheck-amd64-linux
--26307--   Considering
/usr/lib/debug/.build-id/84/fedd9a4c04941b8d123398ad0dd0ebc25c120c.debug ..
--26307--   .. build-id is valid
--26307--    object doesn't have a dynamic symbol table
--26307-- Scheduler: using generic scheduler lock implementation.
--26307-- Reading suppressions file: /usr/libexec/valgrind/default.supp
==26307== embedded gdbserver: reading from
/tmp/vgdb-pipe-from-vgdb-to-26307-by-dylanb-on-???
==26307== embedded gdbserver: writing to  
/tmp/vgdb-pipe-to-vgdb-from-26307-by-dylanb-on-???
==26307== embedded gdbserver: shared mem  
/tmp/vgdb-pipe-shared-mem-vgdb-26307-by-dylanb-on-???
==26307== 
==26307== TO CONTROL THIS PROCESS USING vgdb (which you probably
==26307== don't want to do, unless you know exactly what you're doing,
==26307== or are doing some strange experiment):
==26307==   /usr/bin/vgdb --pid=26307 ...command...
==26307== 
==26307== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==26307==   /path/to/gdb ./test_exit
==26307== and then give GDB the following command
==26307==   target remote | /usr/bin/vgdb --pid=26307
==26307== --pid is optional if only one valgrind process is running
==26307== 
--26307-- REDIR: 0x402aa60 (ld-linux-x86-64.so.2:strlen) redirected to
0x580bcec2 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--26307-- REDIR: 0x402a830 (ld-linux-x86-64.so.2:index) redirected to
0x580bcedc (vgPlain_amd64_linux_REDIR_FOR_index)
--26307-- Reading syms from /usr/libexec/valgrind/vgpreload_core-amd64-linux.so
--26307--   Considering
/usr/lib/debug/.build-id/7b/e1c1588ba6713462a4091c80bbb78004f47ba6.debug ..
--26307--   .. build-id is valid
--26307-- Reading syms from
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so
--26307--   Considering
/usr/lib/debug/.build-id/ca/411cf3a4b32c9d21bbc464935b0f1af28fb2d8.debug ..
--26307--   .. build-id is valid
==26307== WARNING: new redirection conflicts with existing -- ignoring it
--26307--     old: 0x0402aa60 (strlen              ) R-> (0000.0) 0x580bcec2
vgPlain_amd64_linux_REDIR_FOR_strlen
--26307--     new: 0x0402aa60 (strlen              ) R-> (2007.0) 0x0484ee30
strlen
--26307-- REDIR: 0x4027240 (ld-linux-x86-64.so.2:strcmp) redirected to
0x484fcd0 (strcmp)
--26307-- REDIR: 0x402afc0 (ld-linux-x86-64.so.2:mempcpy) redirected to
0x4853840 (mempcpy)
--26307-- Reading syms from /usr/lib/x86_64-linux-gnu/libc.so.6
--26307--   Considering
/usr/lib/debug/.build-id/69/389d485a9793dbe873f0ea2c93e02efaa9aa3d.debug ..
--26307--   .. build-id is valid
==26307== WARNING: new redirection conflicts with existing -- ignoring it
--26307--     old: 0x04921ce0 (memalign            ) R-> (1011.0) 0x0484e080
memalign
--26307--     new: 0x04921ce0 (memalign            ) R-> (1017.0) 0x0484e050
aligned_alloc
==26307== WARNING: new redirection conflicts with existing -- ignoring it
--26307--     old: 0x04921ce0 (memalign            ) R-> (1011.0) 0x0484e080
memalign
--26307--     new: 0x04921ce0 (memalign            ) R-> (1017.0) 0x0484e020
aligned_alloc
==26307== WARNING: new redirection conflicts with existing -- ignoring it
--26307--     old: 0x04921ce0 (memalign            ) R-> (1011.0) 0x0484e080
memalign
--26307--     new: 0x04921ce0 (memalign            ) R-> (1017.0) 0x0484e050
aligned_alloc
==26307== WARNING: new redirection conflicts with existing -- ignoring it
--26307--     old: 0x04921ce0 (memalign            ) R-> (1011.0) 0x0484e080
memalign
--26307--     new: 0x04921ce0 (memalign            ) R-> (1017.0) 0x0484e020
aligned_alloc
--26307-- REDIR: 0x49247a0 (libc.so.6:strnlen) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4924a60 (libc.so.6:strpbrk) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4924360 (libc.so.6:strcmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4942d50 (libc.so.6:wcsnlen) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925750 (libc.so.6:memset) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x49415c0 (libc.so.6:wcslen) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925c90 (libc.so.6:memcpy@@GLIBC_2.14) redirected to
0x483f220 (_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x49413f0 (libc.so.6:wcschr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x49242e0 (libc.so.6:index) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x49249e0 (libc.so.6:rindex) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925620 (libc.so.6:memmove) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
==26307== Preferring higher priority redirection:
--26307--     old: 0x04a1c940 (__memcpy_avx_unalign) R-> (2018.0) 0x04850f90
__memcpy_avx_unaligned_erms
--26307--     new: 0x04a1c940 (__memcpy_avx_unalign) R-> (2018.1) 0x04852880
memmove
--26307-- REDIR: 0x4941470 (libc.so.6:wcscmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925a60 (libc.so.6:stpncpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4941a30 (libc.so.6:wmemchr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x49248b0 (libc.so.6:strncmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925af0 (libc.so.6:strcasecmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x49244a0 (libc.so.6:strcspn) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x49414f0 (libc.so.6:wcscpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4924250 (libc.so.6:strcat) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925be0 (libc.so.6:strncasecmp_l) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925500 (libc.so.6:bcmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x492d5f0 (libc.so.6:memrchr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4927090 (libc.so.6:strchrnul) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4924410 (libc.so.6:strcpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925b90 (libc.so.6:strcasecmp_l) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4924720 (libc.so.6:strlen) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4924950 (libc.so.6:strncpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x49259d0 (libc.so.6:stpcpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925470 (libc.so.6:memchr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4924b80 (libc.so.6:strspn) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925850 (libc.so.6:mempcpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4925b40 (libc.so.6:strncasecmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4927000 (libc.so.6:rawmemchr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26307-- REDIR: 0x4a19790 (libc.so.6:__strrchr_avx2) redirected to 0x484e810
(rindex)
--26307-- REDIR: 0x4921120 (libc.so.6:malloc) redirected to 0x4848820 (malloc)
--26307-- REDIR: 0x4921460 (libc.so.6:free) redirected to 0x484b210 (free)
==26307== 
==26307== HEAP SUMMARY:
==26307==     in use at exit: 100 bytes in 1 blocks
==26307==   total heap usage: 1 allocs, 0 frees, 100 bytes allocated
==26307== 
==26307== Searching for pointers to 1 not-freed blocks
==26307== Checked 108,056 bytes
==26307== 
==26307== 100 bytes in 1 blocks are still reachable in loss record 1 of 1
==26307==    at 0x4848899: malloc (vg_replace_malloc.c:381)
==26307==    by 0x10917E: main (test_exit.c:6)
==26307== 
==26307== LEAK SUMMARY:
==26307==    definitely lost: 0 bytes in 0 blocks
==26307==    indirectly lost: 0 bytes in 0 blocks
==26307==      possibly lost: 0 bytes in 0 blocks
==26307==    still reachable: 100 bytes in 1 blocks
==26307==         suppressed: 0 bytes in 0 blocks
==26307== 
==26307== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
```

test_return.c
```
==26315== Memcheck, a memory error detector
==26315== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==26315== Using Valgrind-3.18.1-42b08ed5bd-20211015 and LibVEX; rerun with -h
for copyright info
==26315== Command: ./test_return
==26315== 
--26315-- Valgrind options:
--26315--    -v
--26315--    -s
--26315--    --leak-check=full
--26315--    --show-leak-kinds=all
--26315-- Contents of /proc/version:
--26315--   Linux version 5.4.72-microsoft-standard-WSL2 (oe-user@oe-host) (gcc
version 8.2.0 (GCC)) #1 SMP Wed Oct 28 23:40:43 UTC 2020
--26315-- 
--26315-- Arch and hwcaps: AMD64, LittleEndian,
amd64-cx16-lzcnt-rdtscp-sse3-ssse3-avx-avx2-bmi-f16c-rdrand-rdseed
--26315-- Page sizes: currently 4096, max supported 4096
--26315-- Valgrind library directory: /usr/libexec/valgrind
--26315-- Reading syms from /tmp/tmp.wURL71ZPmz/test_return
--26315-- Reading syms from /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
--26315--   Considering
/usr/lib/debug/.build-id/61/ef896a699bb1c2e4e231642b2e1688b2f1a61e.debug ..
--26315--   .. build-id is valid
--26315-- Reading syms from /usr/libexec/valgrind/memcheck-amd64-linux
--26315--   Considering
/usr/lib/debug/.build-id/84/fedd9a4c04941b8d123398ad0dd0ebc25c120c.debug ..
--26315--   .. build-id is valid
--26315--    object doesn't have a dynamic symbol table
--26315-- Scheduler: using generic scheduler lock implementation.
--26315-- Reading suppressions file: /usr/libexec/valgrind/default.supp
==26315== embedded gdbserver: reading from
/tmp/vgdb-pipe-from-vgdb-to-26315-by-dylanb-on-???
==26315== embedded gdbserver: writing to  
/tmp/vgdb-pipe-to-vgdb-from-26315-by-dylanb-on-???
==26315== embedded gdbserver: shared mem  
/tmp/vgdb-pipe-shared-mem-vgdb-26315-by-dylanb-on-???
==26315== 
==26315== TO CONTROL THIS PROCESS USING vgdb (which you probably
==26315== don't want to do, unless you know exactly what you're doing,
==26315== or are doing some strange experiment):
==26315==   /usr/bin/vgdb --pid=26315 ...command...
==26315== 
==26315== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==26315==   /path/to/gdb ./test_return
==26315== and then give GDB the following command
==26315==   target remote | /usr/bin/vgdb --pid=26315
==26315== --pid is optional if only one valgrind process is running
==26315== 
--26315-- REDIR: 0x402aa60 (ld-linux-x86-64.so.2:strlen) redirected to
0x580bcec2 (vgPlain_amd64_linux_REDIR_FOR_strlen)
--26315-- REDIR: 0x402a830 (ld-linux-x86-64.so.2:index) redirected to
0x580bcedc (vgPlain_amd64_linux_REDIR_FOR_index)
--26315-- Reading syms from /usr/libexec/valgrind/vgpreload_core-amd64-linux.so
--26315--   Considering
/usr/lib/debug/.build-id/7b/e1c1588ba6713462a4091c80bbb78004f47ba6.debug ..
--26315--   .. build-id is valid
--26315-- Reading syms from
/usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so
--26315--   Considering
/usr/lib/debug/.build-id/ca/411cf3a4b32c9d21bbc464935b0f1af28fb2d8.debug ..
--26315--   .. build-id is valid
==26315== WARNING: new redirection conflicts with existing -- ignoring it
--26315--     old: 0x0402aa60 (strlen              ) R-> (0000.0) 0x580bcec2
vgPlain_amd64_linux_REDIR_FOR_strlen
--26315--     new: 0x0402aa60 (strlen              ) R-> (2007.0) 0x0484ee30
strlen
--26315-- REDIR: 0x4027240 (ld-linux-x86-64.so.2:strcmp) redirected to
0x484fcd0 (strcmp)
--26315-- REDIR: 0x402afc0 (ld-linux-x86-64.so.2:mempcpy) redirected to
0x4853840 (mempcpy)
--26315-- Reading syms from /usr/lib/x86_64-linux-gnu/libc.so.6
--26315--   Considering
/usr/lib/debug/.build-id/69/389d485a9793dbe873f0ea2c93e02efaa9aa3d.debug ..
--26315--   .. build-id is valid
==26315== WARNING: new redirection conflicts with existing -- ignoring it
--26315--     old: 0x04921ce0 (memalign            ) R-> (1011.0) 0x0484e080
memalign
--26315--     new: 0x04921ce0 (memalign            ) R-> (1017.0) 0x0484e050
aligned_alloc
==26315== WARNING: new redirection conflicts with existing -- ignoring it
--26315--     old: 0x04921ce0 (memalign            ) R-> (1011.0) 0x0484e080
memalign
--26315--     new: 0x04921ce0 (memalign            ) R-> (1017.0) 0x0484e020
aligned_alloc
==26315== WARNING: new redirection conflicts with existing -- ignoring it
--26315--     old: 0x04921ce0 (memalign            ) R-> (1011.0) 0x0484e080
memalign
--26315--     new: 0x04921ce0 (memalign            ) R-> (1017.0) 0x0484e050
aligned_alloc
==26315== WARNING: new redirection conflicts with existing -- ignoring it
--26315--     old: 0x04921ce0 (memalign            ) R-> (1011.0) 0x0484e080
memalign
--26315--     new: 0x04921ce0 (memalign            ) R-> (1017.0) 0x0484e020
aligned_alloc
--26315-- REDIR: 0x49247a0 (libc.so.6:strnlen) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4924a60 (libc.so.6:strpbrk) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4924360 (libc.so.6:strcmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4942d50 (libc.so.6:wcsnlen) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925750 (libc.so.6:memset) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x49415c0 (libc.so.6:wcslen) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925c90 (libc.so.6:memcpy@@GLIBC_2.14) redirected to
0x483f220 (_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x49413f0 (libc.so.6:wcschr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x49242e0 (libc.so.6:index) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x49249e0 (libc.so.6:rindex) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925620 (libc.so.6:memmove) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
==26315== Preferring higher priority redirection:
--26315--     old: 0x04a1c940 (__memcpy_avx_unalign) R-> (2018.0) 0x04850f90
__memcpy_avx_unaligned_erms
--26315--     new: 0x04a1c940 (__memcpy_avx_unalign) R-> (2018.1) 0x04852880
memmove
--26315-- REDIR: 0x4941470 (libc.so.6:wcscmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925a60 (libc.so.6:stpncpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4941a30 (libc.so.6:wmemchr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x49248b0 (libc.so.6:strncmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925af0 (libc.so.6:strcasecmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x49244a0 (libc.so.6:strcspn) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x49414f0 (libc.so.6:wcscpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4924250 (libc.so.6:strcat) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925be0 (libc.so.6:strncasecmp_l) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925500 (libc.so.6:bcmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x492d5f0 (libc.so.6:memrchr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4927090 (libc.so.6:strchrnul) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4924410 (libc.so.6:strcpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925b90 (libc.so.6:strcasecmp_l) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4924720 (libc.so.6:strlen) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4924950 (libc.so.6:strncpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x49259d0 (libc.so.6:stpcpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925470 (libc.so.6:memchr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4924b80 (libc.so.6:strspn) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925850 (libc.so.6:mempcpy) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4925b40 (libc.so.6:strncasecmp) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4927000 (libc.so.6:rawmemchr) redirected to 0x483f220
(_vgnU_ifunc_wrapper)
--26315-- REDIR: 0x4a19790 (libc.so.6:__strrchr_avx2) redirected to 0x484e810
(rindex)
--26315-- REDIR: 0x4921120 (libc.so.6:malloc) redirected to 0x4848820 (malloc)
--26315-- REDIR: 0x4921460 (libc.so.6:free) redirected to 0x484b210 (free)
==26315== 
==26315== HEAP SUMMARY:
==26315==     in use at exit: 100 bytes in 1 blocks
==26315==   total heap usage: 1 allocs, 0 frees, 100 bytes allocated
==26315== 
==26315== Searching for pointers to 1 not-freed blocks
==26315== Checked 108,032 bytes
==26315== 
==26315== 100 bytes in 1 blocks are definitely lost in loss record 1 of 1
==26315==    at 0x4848899: malloc (vg_replace_malloc.c:381)
==26315==    by 0x10915E: main (test_return.c:6)
==26315== 
==26315== LEAK SUMMARY:
==26315==    definitely lost: 100 bytes in 1 blocks
==26315==    indirectly lost: 0 bytes in 0 blocks
==26315==      possibly lost: 0 bytes in 0 blocks
==26315==    still reachable: 0 bytes in 0 blocks
==26315==         suppressed: 0 bytes in 0 blocks
==26315== 
==26315== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
```

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to