mainThe GNU Bourne-Again SHell - Support: sr #110008, memory leak detected in bash-5.0

 
 

sr #110008: memory leak detected in bash-5.0

Submitter:  Ilya Shipitsin <chipitsine>
Submitted:  Sun 15 Sep 2019 08:00:15 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 30 Oct 2019 01:11:50 PM UTC, comment #1: 

If you can send an example I can use to reproduce this, I'd appreciate it. It's going to be difficult to investigate without one.

Chet Ramey <chet>
Group administrator
Sun 15 Sep 2019 08:00:15 PM UTC, original submission:  

I was investigating some app using valgrind. It spawned bash, and occasionely some leaks were detected in bash. It is Fedora 30, bash is pretty recent, i.e. 5.0, please have a look at findings

```

  •    diag  0.0 ==13498== 2 bytes in 1 blocks are still reachable in loss record 17 of 899^M
  •    diag  0.0 ==13498==    at 0x483880B: malloc (vg_replace_malloc.c:309)^M
  •    diag  0.0 ==13498==    by 0x198823: xmalloc (xmalloc.c:114)^M
  •    diag  0.0 ==13498==    by 0x156F71: make_variable_value (variables.c:2996)^M
  •    diag  0.0 ==13498==    by 0x15824D: bind_variable_internal (variables.c:3129)^M
  •    diag  0.0 ==13498==    by 0x15AE0A: initialize_shell_variables (variables.c:545)^M
  •    diag  0.0 ==13498==    by 0x138E09: shell_initialize (shell.c:1900)^M
  •    diag  0.0 ==13498==    by 0x137581: main (shell.c:576)^M
  •    diag  0.0 ==13498== ^M


```

and second one

```

  •    diag  0.0 ==13498== 2 bytes in 1 blocks are still reachable in loss record 21 of 899^M
  •    diag  0.0 ==13498==    at 0x483880B: malloc (vg_replace_malloc.c:309)^M
  •    diag  0.0 ==13498==    by 0x198823: xmalloc (xmalloc.c:114)^M
  •    diag  0.0 ==13498==    by 0x183753: array_create_element (array.c:523)^M
  •    diag  0.0 ==13498==    by 0x183C67: array_insert (array.c:563)^M
  •    diag  0.0 ==13498==    by 0x15B13E: make_vers_array (variables.c:984)^M
  •    diag  0.0 ==13498==    by 0x15B13E: initialize_shell_variables (variables.c:569)^M
  •    diag  0.0 ==13498==    by 0x138E09: shell_initialize (shell.c:1900)^M
  •    diag  0.0 ==13498==    by 0x137581: main (shell.c:576)^M
  •    diag  0.0 ==13498== ^M


```

Ilya Shipitsin <chipitsine>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by chipitsine (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-30 chet StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code