bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: current bash.git.devel segfaults on my code


From: Alex fxmbsw7 Ratchev
Subject: Re: current bash.git.devel segfaults on my code
Date: Thu, 14 Oct 2021 10:44:45 +0200

so sir, i tried the asan way first but it said it cant work on ptrace (
probably by proot, some tool to chroot nonroot disros root ) i run it (
debian startup script ) and gives me bash inside deb then

anyway valgrind says much
i hooe u can gimme further instructions

pasted is valgrind bash, exited, then reran with --opt

valgrind bash

==28827== Memcheck, a memory error detector
==28827== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==28827== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==28827== Command: bash
==28827==
==28832==
==28832== HEAP SUMMARY:
==28832==     in use at exit: 143,084 bytes in 811 blocks
==28832==   total heap usage: 3,012 allocs, 2,201 frees, 239,069 bytes
allocated
==28832==
==28832== LEAK SUMMARY:
==28832==    definitely lost: 24 bytes in 1 blocks
==28832==    indirectly lost: 0 bytes in 0 blocks
==28832==      possibly lost: 0 bytes in 0 blocks
==28832==    still reachable: 143,060 bytes in 810 blocks
==28832==         suppressed: 0 bytes in 0 blocks
==28832== Rerun with --leak-check=full to see details of leaked memory
==28832==
==28832== For lists of detected and suppressed errors, rerun with: -s
==28832== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==28840==
==28840== HEAP SUMMARY:
==28840==     in use at exit: 152,746 bytes in 956 blocks
==28840==   total heap usage: 4,719 allocs, 3,763 frees, 441,263 bytes
allocated
==28840==
==28840== LEAK SUMMARY:
==28840==    definitely lost: 58 bytes in 3 blocks
==28840==    indirectly lost: 0 bytes in 0 blocks
==28840==      possibly lost: 0 bytes in 0 blocks
==28840==    still reachable: 152,688 bytes in 953 blocks
==28840==         suppressed: 0 bytes in 0 blocks
==28840== Rerun with --leak-check=full to see details of leaked memory
==28840==
==28840== For lists of detected and suppressed errors, rerun with: -s
==28840== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==28838==
==28838== HEAP SUMMARY:
==28838==     in use at exit: 148,736 bytes in 894 blocks
==28838==   total heap usage: 3,796 allocs, 2,902 frees, 408,166 bytes
allocated
==28838==
==28838== LEAK SUMMARY:
==28838==    definitely lost: 41 bytes in 2 blocks
==28838==    indirectly lost: 0 bytes in 0 blocks
==28838==      possibly lost: 0 bytes in 0 blocks
==28838==    still reachable: 148,695 bytes in 892 blocks
==28838==         suppressed: 0 bytes in 0 blocks
==28838== Rerun with --leak-check=full to see details of leaked memory
==28838==
==28838== For lists of detected and suppressed errors, rerun with: -s
==28838== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==28836==
==28836== HEAP SUMMARY:
==28836==     in use at exit: 144,750 bytes in 840 blocks
==28836==   total heap usage: 3,563 allocs, 2,723 frees, 392,380 bytes
allocated
==28836==
==28836== LEAK SUMMARY:
==28836==    definitely lost: 24 bytes in 1 blocks
==28836==    indirectly lost: 0 bytes in 0 blocks
==28836==      possibly lost: 0 bytes in 0 blocks
==28836==    still reachable: 144,726 bytes in 839 blocks
==28836==         suppressed: 0 bytes in 0 blocks
==28836== Rerun with --leak-check=full to see details of leaked memory
==28836==
==28836== For lists of detected and suppressed errors, rerun with: -s
==28836== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==28843==
==28843== HEAP SUMMARY:
==28843==     in use at exit: 145,944 bytes in 864 blocks
==28843==   total heap usage: 4,202 allocs, 3,338 frees, 419,758 bytes
allocated
==28843==
==28843== LEAK SUMMARY:
==28843==    definitely lost: 41 bytes in 2 blocks
==28843==    indirectly lost: 0 bytes in 0 blocks
==28843==      possibly lost: 0 bytes in 0 blocks
==28843==    still reachable: 145,903 bytes in 862 blocks
==28843==         suppressed: 0 bytes in 0 blocks
==28843== Rerun with --leak-check=full to see details of leaked memory
==28843==
==28843== For lists of detected and suppressed errors, rerun with: -s
       ==28843== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0
from 0)          ==28845==
==28845== HEAP SUMMARY:
==28845==     in use at exit: 697,558 bytes in 2,303 blocks
==28845==   total heap usage: 6,720 allocs, 4,417 frees, 1,011,424 bytes
allocated
==28845==
==28845== LEAK SUMMARY:
==28845==    definitely lost: 24 bytes in 1 blocks
==28845==    indirectly lost: 0 bytes in 0 blocks
==28845==      possibly lost: 0 bytes in 0 blocks
==28845==    still reachable: 697,534 bytes in 2,302 blocks
==28845==         suppressed: 0 bytes in 0 blocks
==28845== Rerun with --leak-check=full to see details of leaked memory
==28845==
       ==28845== For lists of detected and suppressed errors, rerun with:
-s             ==28845== ERROR SUMMARY: 0 errors from 0 contexts
(suppressed: 0 from 0)          ==28851==
                                       ==28851== HEAP SUMMARY:
                                             ==28851==     in use at exit:
179,559 bytes in 2,360 blocks
==28851==   total heap usage: 8,195 allocs, 5,835 frees, 780,992 bytes
allocated
==28851==
==28851== LEAK SUMMARY:
==28851==    definitely lost: 58 bytes in 3 blocks
==28851==    indirectly lost: 0 bytes in 0 blocks
==28851==      possibly lost: 0 bytes in 0 blocks
==28851==    still reachable: 179,501 bytes in 2,357 blocks
==28851==         suppressed: 0 bytes in 0 blocks
==28851== Rerun with --leak-check=full to see details of leaked memory
==28851==
==28851== For lists of detected and suppressed errors, rerun with: -s
==28851== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
      ==28849==
             ==28849== HEAP SUMMARY:
                   ==28849==     in use at exit: 175,549 bytes in 2,298
blocks                       ==28849==   total heap usage: 7,416 allocs,
5,118 frees, 751,568 bytes allocated  ==28849==
                                             ==28849== LEAK SUMMARY:
==28849==    definitely lost: 41 bytes in 2 blocks
==28849==    indirectly lost: 0 bytes in 0 blocks
==28849==      possibly lost: 0 bytes in 0 blocks
==28849==    still reachable: 175,508 bytes in 2,296 blocks
==28849==         suppressed: 0 bytes in 0 blocks
==28849== Rerun with --leak-check=full to see details of leaked memory
==28849==
==28849== For lists of detected and suppressed errors, rerun with: -s
==28849== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==28847==
       ==28847== HEAP SUMMARY:
==28847==     in use at exit: 696,875 bytes in 2,246 blocks
==28847==   total heap usage: 7,185 allocs, 4,939 frees, 1,261,094 bytes
allocated
==28847==
==28847== LEAK SUMMARY:
==28847==    definitely lost: 24 bytes in 1 blocks
      ==28847==    indirectly lost: 0 bytes in 0 blocks
             ==28847==      possibly lost: 0 bytes in 0 blocks
                   ==28847==    still reachable: 696,851 bytes in 2,245
blocks                       ==28847==         suppressed: 0 bytes in 0
blocks
==28847== Rerun with --leak-check=full to see details of leaked memory
==28847==
==28847== For lists of detected and suppressed errors, rerun with: -s
==28847== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==28854==
==28854== HEAP SUMMARY:
==28854==     in use at exit: 696,498 bytes in 2,249 blocks
==28854==   total heap usage: 7,791 allocs, 5,542 frees, 1,286,110 bytes
allocated
==28854==
==28854== LEAK SUMMARY:
       ==28854==    definitely lost: 41 bytes in 2 blocks
              ==28854==    indirectly lost: 0 bytes in 0 blocks
                     ==28854==      possibly lost: 0 bytes in 0 blocks
                           ==28854==    still reachable: 696,457 bytes in
2,247 blocks
==28854==         suppressed: 0 bytes in 0 blocks
==28854== Rerun with --leak-check=full to see details of leaked memory
==28854==
==28854== For lists of detected and suppressed errors, rerun with: -s
==28854== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==28860==
==28860== HEAP SUMMARY:
==28860==     in use at exit: 749,293 bytes in 4,009 blocks
==28860==   total heap usage: 14,390 allocs, 10,381 frees, 1,547,928 bytes
allocated
==28860==
==28860== LEAK SUMMARY:
==28860==    definitely lost: 24 bytes in 1 blocks
==28860==    indirectly lost: 0 bytes in 0 blocks
==28860==      possibly lost: 0 bytes in 0 blocks
==28860==    still reachable: 749,269 bytes in 4,008 blocks
==28860==         suppressed: 0 bytes in 0 blocks
==28860== Rerun with --leak-check=full to see details of leaked memory
==28860==
==28860== For lists of detected and suppressed errors, rerun with: -s
==28860== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==28862==
==28862== HEAP SUMMARY:
==28862==     in use at exit: 753,346 bytes in 4,060 blocks
==28862==   total heap usage: 14,874 allocs, 10,814 frees, 1,559,631 bytes
allocated
==28862==
==28862== LEAK SUMMARY:
==28862==    definitely lost: 41 bytes in 2 blocks
==28862==    indirectly lost: 0 bytes in 0 blocks
==28862==      possibly lost: 0 bytes in 0 blocks
==28862==    still reachable: 753,305 bytes in 4,058 blocks
==28862==         suppressed: 0 bytes in 0 blocks
==28862== Rerun with --leak-check=full to see details of leaked memory
==28862==
==28862== For lists of detected and suppressed errors, rerun with: -s
==28862== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
0 exit // 2 old , static

2021-10-14 , Thu Oct , 08:38:44.930700 == 1634200724.930700
# root:0:0 # @ /dev/pts/0 ( 0 ) -> /root/b1

support/ builtins/ po/ doc/ autom4te.cache/ .git/ tests/ m4/ lib/ include/
.made xmalloc.o syntax.o pcomplib.o pcomplete.o redir.o findcmd.o locale.o
bashbug* bash* mksignames* bashversion* mksyntax* config.status* configure*


exit
==28827==
==28827== HEAP SUMMARY:
==28827==     in use at exit: 869,815 bytes in 4,187 blocks
==28827==   total heap usage: 15,308 allocs, 11,121 frees, 1,692,675 bytes
allocated
==28827==
==28827== LEAK SUMMARY:
==28827==    definitely lost: 24 bytes in 1 blocks
==28827==    indirectly lost: 0 bytes in 0 blocks
==28827==      possibly lost: 0 bytes in 0 blocks
==28827==    still reachable: 869,791 bytes in 4,186 blocks
==28827==         suppressed: 0 bytes in 0 blocks
==28827== Rerun with --leak-check=full to see details of leaked memory
==28827==
==28827== For lists of detected and suppressed errors, rerun with: -s
==28827== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
0 exit // 430 old , static

      2021-10-14 , Thu Oct , 08:39:35.561635 == 1634200775.561635
             # root:0:0 # @ /dev/pts/0 ( 0 ) -> /root/b1

                         support/ builtins/ po/ doc/ autom4te.cache/ .git/
tests/ m4/ lib/ include/        .made xmalloc.o syntax.o pcomplib.o
pcomplete.o redir.o findcmd.o locale.o        bashbug* bash* mksignames*
bashversion* mksyntax* config.status* configure*

valgrind --leak-check=full bash

==29248== Memcheck, a memory error detector
==29248== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==29248== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info
==29248== Command: bash
==29248==
==29250==
==29250== HEAP SUMMARY:
==29250==     in use at exit: 143,084 bytes in 811 blocks
==29250==   total heap usage: 3,012 allocs, 2,201 frees, 239,069 bytes
allocated
==29250==
==29250== 24 bytes in 1 blocks are definitely lost in loss record 186 of
501      ==29250==    at 0x484F048: malloc (vg_replace_malloc.c:380)
               ==29250==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
                      ==29250==    by 0x14AFF3: tilde_initialize (in
/usr/local/bin/bash)
==29250==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29250==    by 0x13A587: main (in /usr/local/bin/bash)
==29250==
==29250== LEAK SUMMARY:
==29250==    definitely lost: 24 bytes in 1 blocks
==29250==    indirectly lost: 0 bytes in 0 blocks
==29250==      possibly lost: 0 bytes in 0 blocks
==29250==    still reachable: 143,060 bytes in 810 blocks
       ==29250==         suppressed: 0 bytes in 0 blocks
             ==29250== Reachable blocks (those to which a pointer was
found) are not shown.
==29250== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==29250==
==29250== For lists of detected and suppressed errors, rerun with: -s
==29250== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==29256==
==29256== HEAP SUMMARY:
==29256==     in use at exit: 152,750 bytes in 956 blocks
==29256==   total heap usage: 4,719 allocs, 3,763 frees, 441,279 bytes
allocated
==29256==
==29256== 24 bytes in 1 blocks are definitely lost in loss record 223 of 624
==29256==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29256==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
      ==29256==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29256==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29256==    by 0x13A587: main (in /usr/local/bin/bash)
==29256==
==29256== 34 bytes in 2 blocks are definitely lost in loss record 439 of
624      ==29256==    at 0x484F048: malloc (vg_replace_malloc.c:380)
               ==29256==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
                      ==29256==    by 0x176E67: ??? (in
/usr/local/bin/bash)                            ==29256==    by 0x17E153:
??? (in /usr/local/bin/bash)                            ==29256==    by
0x17F5EF: ??? (in /usr/local/bin/bash)
==29256==    by 0x183D8F: expand_words_no_vars (in /usr/local/bin/bash)
==29256==    by 0x19EBBB: redirection_expand (in /usr/local/bin/bash)
==29256==    by 0x19F25F: ??? (in /usr/local/bin/bash)
==29256==    by 0x1A014F: do_redirections (in /usr/local/bin/bash)
==29256==    by 0x152DDF: ??? (in /usr/local/bin/bash)
      ==29256==    by 0x155F33: execute_command_internal (in
/usr/local/bin/bash)
==29256==    by 0x1AA747: parse_and_execute (in /usr/local/bin/bash)
==29256==
       ==29256== LEAK SUMMARY:
             ==29256==    definitely lost: 58 bytes in 3 blocks
                    ==29256==    indirectly lost: 0 bytes in 0 blocks
                           ==29256==      possibly lost: 0 bytes in 0 blocks
==29256==    still reachable: 152,692 bytes in 953 blocks
==29256==         suppressed: 0 bytes in 0 blocks
       ==29256== Reachable blocks (those to which a pointer was found) are
not shown.    ==29256== To see them, rerun with: --leak-check=full
--show-leak-kinds=all        ==29256==
                                   ==29256== For lists of detected and
suppressed errors, rerun with: -s
==29256== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==29254==
       ==29254== HEAP SUMMARY:
             ==29254==     in use at exit: 148,739 bytes in 894 blocks
                   ==29254==   total heap usage: 3,796 allocs, 2,902 frees,
408,183 bytes allocated  ==29254==
==29254== 17 bytes in 1 blocks are definitely lost in loss record 205 of 574
==29254==    at 0x484F048: malloc (vg_replace_malloc.c:380)
       ==29254==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
              ==29254==    by 0x176E67: ??? (in /usr/local/bin/bash)
                    ==29254==    by 0x17E153: ??? (in /usr/local/bin/bash)
                          ==29254==    by 0x17F5EF: ??? (in
/usr/local/bin/bash)
==29254==    by 0x183D8F: expand_words_no_vars (in /usr/local/bin/bash)
       ==29254==    by 0x19EBBB: redirection_expand (in
/usr/local/bin/bash)             ==29254==    by 0x19F25F: ??? (in
/usr/local/bin/bash)                            ==29254==    by 0x1A014F:
do_redirections (in /usr/local/bin/bash)                ==29254==    by
0x152DDF: ??? (in /usr/local/bin/bash)
==29254==    by 0x155F33: execute_command_internal (in /usr/local/bin/bash)
==29254==    by 0x1AA747: parse_and_execute (in /usr/local/bin/bash)
      ==29254==
             ==29254== 24 bytes in 1 blocks are definitely lost in loss
record 214 of 574      ==29254==    at 0x484F048: malloc
(vg_replace_malloc.c:380)                       ==29254==    by 0x1A33B3:
xmalloc (in /usr/local/bin/bash)
==29254==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29254==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
      ==29254==    by 0x13A587: main (in /usr/local/bin/bash)
             ==29254==
                   ==29254== LEAK SUMMARY:
                         ==29254==    definitely lost: 41 bytes in 2 blocks
==29254==    indirectly lost: 0 bytes in 0 blocks
==29254==      possibly lost: 0 bytes in 0 blocks
       ==29254==    still reachable: 148,698 bytes in 892 blocks
             ==29254==         suppressed: 0 bytes in 0 blocks
                   ==29254== Reachable blocks (those to which a pointer was
found) are not shown.    ==29254== To see them, rerun with:
--leak-check=full --show-leak-kinds=all
==29254==
==29254== For lists of detected and suppressed errors, rerun with: -s
       ==29254== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0
from 0)          ==29252==
                       ==29252== HEAP SUMMARY:
                             ==29252==     in use at exit: 144,752 bytes in
840 blocks
==29252==   total heap usage: 3,563 allocs, 2,723 frees, 392,387 bytes
allocated
==29252==
       ==29252== 24 bytes in 1 blocks are definitely lost in loss record
197 of 520      ==29252==    at 0x484F048: malloc
(vg_replace_malloc.c:380)                       ==29252==    by 0x1A33B3:
xmalloc (in /usr/local/bin/bash)                        ==29252==    by
0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29252==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29252==    by 0x13A587: main (in /usr/local/bin/bash)
       ==29252==
             ==29252== LEAK SUMMARY:
                   ==29252==    definitely lost: 24 bytes in 1 blocks
                          ==29252==    indirectly lost: 0 bytes in 0 blocks
==29252==      possibly lost: 0 bytes in 0 blocks
==29252==    still reachable: 144,728 bytes in 839 blocks
       ==29252==         suppressed: 0 bytes in 0 blocks
             ==29252== Reachable blocks (those to which a pointer was
found) are not shown.    ==29252== To see them, rerun with:
--leak-check=full --show-leak-kinds=all        ==29252==
==29252== For lists of detected and suppressed errors, rerun with: -s
==29252== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
      ==29259==
             ==29259== HEAP SUMMARY:
                   ==29259==     in use at exit: 145,947 bytes in 864
blocks                         ==29259==   total heap usage: 4,202 allocs,
3,338 frees, 420,046 bytes allocated
==29259==
==29259== 17 bytes in 1 blocks are definitely lost in loss record 202 of
525      ==29259==    at 0x484F048: malloc (vg_replace_malloc.c:380)
               ==29259==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
                      ==29259==    by 0x176E67: ??? (in
/usr/local/bin/bash)                            ==29259==    by 0x17E153:
??? (in /usr/local/bin/bash)
==29259==    by 0x17F5EF: ??? (in /usr/local/bin/bash)
==29259==    by 0x183A4F: expand_words (in /usr/local/bin/bash)
       ==29259==    by 0x15546F: execute_command_internal (in
/usr/local/bin/bash)       ==29259==    by 0x158283: ??? (in
/usr/local/bin/bash)                            ==29259==    by 0x153FC7:
execute_command_internal (in /usr/local/bin/bash)       ==29259==    by
0x15669F: execute_command (in /usr/local/bin/bash)
==29259==    by 0x158243: ??? (in /usr/local/bin/bash)
==29259==    by 0x153FC7: execute_command_internal (in /usr/local/bin/bash)
==29259==
       ==29259== 24 bytes in 1 blocks are definitely lost in loss record
211 of 525      ==29259==    at 0x484F048: malloc
(vg_replace_malloc.c:380)                       ==29259==    by 0x1A33B3:
xmalloc (in /usr/local/bin/bash)                        ==29259==    by
0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29259==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29259==    by 0x13A587: main (in /usr/local/bin/bash)
==29259==
       ==29259== LEAK SUMMARY:
             ==29259==    definitely lost: 41 bytes in 2 blocks
                    ==29259==    indirectly lost: 0 bytes in 0 blocks
                           ==29259==      possibly lost: 0 bytes in 0
blocks                                 ==29259==    still reachable:
145,906 bytes in 862 blocks                         ==29259==
 suppressed: 0 bytes in 0 blocks
==29259== Reachable blocks (those to which a pointer was found) are not
shown.    ==29259== To see them, rerun with: --leak-check=full
--show-leak-kinds=all        ==29259==
                                   ==29259== For lists of detected and
suppressed errors, rerun with: -s             ==29259== ERROR SUMMARY: 2
errors from 2 contexts (suppressed: 0 from 0)
==29261==
==29261== HEAP SUMMARY:
==29261==     in use at exit: 697,561 bytes in 2,303 blocks
       ==29261==   total heap usage: 6,720 allocs, 4,417 frees, 1,011,712
bytes allocated==29261==
                     ==29261== 24 bytes in 1 blocks are definitely lost in
loss record 342 of 951      ==29261==    at 0x484F048: malloc
(vg_replace_malloc.c:380)
==29261==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29261==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29261==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29261==    by 0x13A587: main (in /usr/local/bin/bash)
       ==29261==
==29261== LEAK SUMMARY:
==29261==    definitely lost: 24 bytes in 1 blocks
==29261==    indirectly lost: 0 bytes in 0 blocks
==29261==      possibly lost: 0 bytes in 0 blocks
       ==29261==    still reachable: 697,537 bytes in 2,302 blocks
             ==29261==         suppressed: 0 bytes in 0 blocks
                   ==29261== Reachable blocks (those to which a pointer was
found) are not shown.    ==29261== To see them, rerun with:
--leak-check=full --show-leak-kinds=all
==29261==
==29261== For lists of detected and suppressed errors, rerun with: -s
==29261== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
      ==29267==
==29267== HEAP SUMMARY:
==29267==     in use at exit: 179,561 bytes in 2,360 blocks
==29267==   total heap usage: 8,195 allocs, 5,835 frees, 781,280 bytes
allocated
==29267==
==29267== 24 bytes in 1 blocks are definitely lost in loss record 364 of
1,045
==29267==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29267==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29267==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29267==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29267==    by 0x13A587: main (in /usr/local/bin/bash)
==29267==
==29267== 34 bytes in 2 blocks are definitely lost in loss record 685 of
1,045
==29267==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29267==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29267==    by 0x176E67: ??? (in /usr/local/bin/bash)
==29267==    by 0x17E153: ??? (in /usr/local/bin/bash)
==29267==    by 0x17F5EF: ??? (in /usr/local/bin/bash)
==29267==    by 0x183D8F: expand_words_no_vars (in /usr/local/bin/bash)
==29267==    by 0x19EBBB: redirection_expand (in /usr/local/bin/bash)
       ==29267==    by 0x19F25F: ??? (in /usr/local/bin/bash)
              ==29267==    by 0x1A014F: do_redirections (in
/usr/local/bin/bash)                ==29267==    by 0x152DDF: ??? (in
/usr/local/bin/bash)                            ==29267==    by 0x155F33:
execute_command_internal (in /usr/local/bin/bash)       ==29267==    by
0x1AA747: parse_and_execute (in /usr/local/bin/bash)
==29267==
==29267== LEAK SUMMARY:
==29267==    definitely lost: 58 bytes in 3 blocks
==29267==    indirectly lost: 0 bytes in 0 blocks
==29267==      possibly lost: 0 bytes in 0 blocks
==29267==    still reachable: 179,503 bytes in 2,357 blocks
==29267==         suppressed: 0 bytes in 0 blocks
==29267== Reachable blocks (those to which a pointer was found) are not
shown.
==29267== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==29267==
       ==29267== For lists of detected and suppressed errors, rerun with:
-s             ==29267== ERROR SUMMARY: 2 errors from 2 contexts
(suppressed: 0 from 0)          ==29265==
                                       ==29265== HEAP SUMMARY:
                                             ==29265==     in use at exit:
175,551 bytes in 2,298 blocks                       ==29265==   total heap
usage: 7,416 allocs, 5,118 frees, 751,856 bytes allocated
==29265==
==29265== 17 bytes in 1 blocks are definitely lost in loss record 317 of 995
==29265==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29265==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29265==    by 0x176E67: ??? (in /usr/local/bin/bash)
==29265==    by 0x17E153: ??? (in /usr/local/bin/bash)
==29265==    by 0x17F5EF: ??? (in /usr/local/bin/bash)
==29265==    by 0x183D8F: expand_words_no_vars (in /usr/local/bin/bash)
==29265==    by 0x19EBBB: redirection_expand (in /usr/local/bin/bash)
       ==29265==    by 0x19F25F: ??? (in /usr/local/bin/bash)
==29265==    by 0x1A014F: do_redirections (in /usr/local/bin/bash)
==29265==    by 0x152DDF: ??? (in /usr/local/bin/bash)
==29265==    by 0x155F33: execute_command_internal (in /usr/local/bin/bash)
==29265==    by 0x1AA747: parse_and_execute (in /usr/local/bin/bash)
      ==29265==
             ==29265== 24 bytes in 1 blocks are definitely lost in loss
record 355 of 995      ==29265==    at 0x484F048: malloc
(vg_replace_malloc.c:380)                       ==29265==    by 0x1A33B3:
xmalloc (in /usr/local/bin/bash)
==29265==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29265==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29265==    by 0x13A587: main (in /usr/local/bin/bash)
==29265==
==29265== LEAK SUMMARY:
==29265==    definitely lost: 41 bytes in 2 blocks
==29265==    indirectly lost: 0 bytes in 0 blocks
==29265==      possibly lost: 0 bytes in 0 blocks
       ==29265==    still reachable: 175,510 bytes in 2,296 blocks
             ==29265==         suppressed: 0 bytes in 0 blocks
                   ==29265== Reachable blocks (those to which a pointer was
found) are not shown.    ==29265== To see them, rerun with:
--leak-check=full --show-leak-kinds=all
==29265==
==29265== For lists of detected and suppressed errors, rerun with: -s
==29265== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
==29263==
==29263== HEAP SUMMARY:
==29263==     in use at exit: 696,877 bytes in 2,246 blocks
==29263==   total heap usage: 7,185 allocs, 4,939 frees, 1,261,382 bytes
allocated
==29263==
==29263== 24 bytes in 1 blocks are definitely lost in loss record 338 of 943
==29263==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29263==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29263==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29263==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29263==    by 0x13A587: main (in /usr/local/bin/bash)
==29263==
==29263== LEAK SUMMARY:
==29263==    definitely lost: 24 bytes in 1 blocks
==29263==    indirectly lost: 0 bytes in 0 blocks
==29263==      possibly lost: 0 bytes in 0 blocks
==29263==    still reachable: 696,853 bytes in 2,245 blocks
==29263==         suppressed: 0 bytes in 0 blocks
==29263== Reachable blocks (those to which a pointer was found) are not
shown.
==29263== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==29263==
==29263== For lists of detected and suppressed errors, rerun with: -s
==29263== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==29270==
==29270== HEAP SUMMARY:
==29270==     in use at exit: 696,499 bytes in 2,249 blocks
==29270==   total heap usage: 7,791 allocs, 5,542 frees, 1,286,398 bytes
allocated
==29270==
==29270== 17 bytes in 1 blocks are definitely lost in loss record 314 of 946
==29270==    at 0x484F048: malloc (vg_replace_malloc.c:380)
       ==29270==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
              ==29270==    by 0x176E67: ??? (in /usr/local/bin/bash)
                    ==29270==    by 0x17E153: ??? (in /usr/local/bin/bash)
                          ==29270==    by 0x17F5EF: ??? (in
/usr/local/bin/bash)                            ==29270==    by 0x183A4F:
expand_words (in /usr/local/bin/bash)                   ==29270==    by
0x15546F: execute_command_internal (in /usr/local/bin/bash)
==29270==    by 0x158283: ??? (in /usr/local/bin/bash)
==29270==    by 0x153FC7: execute_command_internal (in /usr/local/bin/bash)
==29270==    by 0x15669F: execute_command (in /usr/local/bin/bash)
==29270==    by 0x158243: ??? (in /usr/local/bin/bash)
==29270==    by 0x153FC7: execute_command_internal (in /usr/local/bin/bash)
==29270==
==29270== 24 bytes in 1 blocks are definitely lost in loss record 351 of 946
==29270==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29270==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29270==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29270==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29270==    by 0x13A587: main (in /usr/local/bin/bash)
       ==29270==
             ==29270== LEAK SUMMARY:
                   ==29270==    definitely lost: 41 bytes in 2 blocks
==29270==    indirectly lost: 0 bytes in 0 blocks
==29270==      possibly lost: 0 bytes in 0 blocks
==29270==    still reachable: 696,458 bytes in 2,247 blocks
==29270==         suppressed: 0 bytes in 0 blocks
==29270== Reachable blocks (those to which a pointer was found) are not
shown.
==29270== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==29270==
       ==29270== For lists of detected and suppressed errors, rerun with:
-s             ==29270== ERROR SUMMARY: 2 errors from 2 contexts
(suppressed: 0 from 0)
==29274==
==29274== HEAP SUMMARY:
==29274==     in use at exit: 749,294 bytes in 4,009 blocks
==29274==   total heap usage: 14,390 allocs, 10,381 frees, 1,548,216 bytes
allocated
==29274==
==29274== 24 bytes in 1 blocks are definitely lost in loss record 360 of
1,000
==29274==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29274==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29274==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29274==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29274==    by 0x13A587: main (in /usr/local/bin/bash)
       ==29274==
==29274== LEAK SUMMARY:
==29274==    definitely lost: 24 bytes in 1 blocks
==29274==    indirectly lost: 0 bytes in 0 blocks
       ==29274==      possibly lost: 0 bytes in 0 blocks
             ==29274==    still reachable: 749,270 bytes in 4,008 blocks
                   ==29274==         suppressed: 0 bytes in 0 blocks
                         ==29274== Reachable blocks (those to which a
pointer was found) are not shown.    ==29274== To see them, rerun with:
--leak-check=full --show-leak-kinds=all
==29274==
==29274== For lists of detected and suppressed errors, rerun with: -s
==29274== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==29278==
==29278== HEAP SUMMARY:
       ==29278==     in use at exit: 753,347 bytes in 4,060 blocks
==29278==   total heap usage: 14,874 allocs, 10,814 frees, 1,559,919 bytes
allocated
==29278==
==29278== 17 bytes in 1 blocks are definitely lost in loss record 312 of
1,059
==29278==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29278==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29278==    by 0x176E67: ??? (in /usr/local/bin/bash)
==29278==    by 0x17E153: ??? (in /usr/local/bin/bash)
==29278==    by 0x17F5EF: ??? (in /usr/local/bin/bash)
==29278==    by 0x183A4F: expand_words (in /usr/local/bin/bash)
==29278==    by 0x15546F: execute_command_internal (in /usr/local/bin/bash)
==29278==    by 0x15466B: execute_command_internal (in /usr/local/bin/bash)
==29278==    by 0x1579A7: ??? (in /usr/local/bin/bash)
==29278==    by 0x156553: execute_command_internal (in /usr/local/bin/bash)
==29278==    by 0x1AA747: parse_and_execute (in /usr/local/bin/bash)
==29278==    by 0x17969F: command_substitute (in /usr/local/bin/bash)
==29278==
==29278== 24 bytes in 1 blocks are definitely lost in loss record 358 of
1,059
==29278==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29278==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29278==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29278==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29278==    by 0x13A587: main (in /usr/local/bin/bash)
==29278==
==29278== LEAK SUMMARY:
==29278==    definitely lost: 41 bytes in 2 blocks
==29278==    indirectly lost: 0 bytes in 0 blocks
==29278==      possibly lost: 0 bytes in 0 blocks
==29278==    still reachable: 753,306 bytes in 4,058 blocks
==29278==         suppressed: 0 bytes in 0 blocks
==29278== Reachable blocks (those to which a pointer was found) are not
shown.
==29278== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==29278==
==29278== For lists of detected and suppressed errors, rerun with: -s
==29278== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
0 exit // 1 old , static

2021-10-14 , Thu Oct , 08:40:02.711957 == 1634200802.711957
# root:0:0 # @ /dev/pts/0 ( 0 ) -> /root/b1

support/ builtins/ po/ doc/ autom4te.cache/ .git/ tests/ m4/ lib/ include/
.made xmalloc.o syntax.o pcomplib.o pcomplete.o redir.o findcmd.o locale.o
bashbug* bash* mksignames* bashversion* mksyntax* config.status* configure*


exit
==29248==
==29248== HEAP SUMMARY:
==29248==     in use at exit: 869,579 bytes in 4,186 blocks
==29248==   total heap usage: 15,292 allocs, 11,106 frees, 1,692,612 bytes
allocated
==29248==
==29248== 24 bytes in 1 blocks are definitely lost in loss record 368 of
1,031
==29248==    at 0x484F048: malloc (vg_replace_malloc.c:380)
==29248==    by 0x1A33B3: xmalloc (in /usr/local/bin/bash)
==29248==    by 0x14AFF3: tilde_initialize (in /usr/local/bin/bash)
==29248==    by 0x13BDB3: ??? (in /usr/local/bin/bash)
==29248==    by 0x13A587: main (in /usr/local/bin/bash)
==29248==
==29248== LEAK SUMMARY:
==29248==    definitely lost: 24 bytes in 1 blocks
==29248==    indirectly lost: 0 bytes in 0 blocks
==29248==      possibly lost: 0 bytes in 0 blocks
==29248==    still reachable: 869,555 bytes in 4,185 blocks
==29248==         suppressed: 0 bytes in 0 blocks
==29248== Reachable blocks (those to which a pointer was found) are not
shown.
==29248== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==29248==
==29248== For lists of detected and suppressed errors, rerun with: -s
==29248== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
0 exit // 461 old , static

On Wed, Oct 13, 2021, 15:28 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com> wrote:

> thank you much sir ill examine your instructions
>
> On Wed, Oct 13, 2021, 15:27 Chet Ramey <chet.ramey@case.edu> wrote:
>
>> On 10/12/21 9:15 PM, Alex fxmbsw7 Ratchev wrote:
>> > could you give me maybe good urls about such to learn ( maybe not too
>> long
>> > ones .. ) ?
>>
>> You should, with a current bash devel, just be able to run
>>
>> make clean
>> make valgrind
>>
>> That disables some bash malloc wrapping functions that confuse valgrind
>> severely. Then just run
>>
>> valgrind bash
>> or
>> valgrind --leak-check=full bash
>>
>> and see what you get. (Assuming you have valgrind installed, of course,
>> and
>> depending on what you want to find out).
>>
>> If you want to try address sanitizer, make sure you have a compiler that
>> supports it, then run
>>
>> make clean
>> make asan
>>
>> I put the shorthand targets in for convenience. Once you build a bash with
>> address sanitizer support, you just have to run it and see what it
>> reports.
>>
>> Chet
>>
>> --
>> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>>                  ``Ars longa, vita brevis'' - Hippocrates
>> Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/
>>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]