helpThe GNU Bourne-Again SHell - Support: sr #107851, Memory leak on interrupted path...


sr #107851: Memory leak on interrupted path completion

Submitted by:  Garrett Cooper <yaneurabeya>
Submitted on:  Mon 24 Oct 2011 12:55:40 AM UTC  
Category: NonePriority: 5 - Normal
Severity: 4 - ImportantStatus: Done
Privacy: PublicAssigned to: None
Open/Closed: OpenOperating System: *BSD

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 24 Oct 2011 12:55:40 AM UTC, original submission:

When doing something like path completion on a directory, then hitting ^C when it says "Display all ... possibilities? (y or n)", or when ^C is entered while the readline completer is building the list of available matches, some or more of the results are leaked.

This is particularly prominent on large directories as I've seen multiple instances of bash eat up over 1GB in resident memory.

This is using both the FreeBSD port version and a git master version I handrolled to try and isolate the issue.

I thought the issue was that closedir wasn't being called in all error cases, because that's there are cookies involved in FreeBSD libc that cleanup after telldir is run, but that doesn't appear to be the sole culprit.

I'm in the process of writing up a repro script which will work on FreeBSD, Linux, and OSX.

Garrett Cooper <yaneurabeya>


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by chet (Updated the item)
  • -unavailable- added by yaneurabeya (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 12 Nov 2015 11:29:28 PM UTCchetStatusNone=>Done

    Back to the top

    Powered by Savane 3.1-cleanup1