[Bug libc/3253] New: glob() crashes when trying to match too many files

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug libc/3253] New: glob() crashes when trying to match too many files

fweimer at redhat dot com
When trying to match really huge amount of files (several hundred of thousands),
glob()'s stack overflows because it uses alloca() to allocate the entry records
temporarily. The attached patch (which is not totally trivial so you might want
to postpone that post glibc-2.5) aims to fix that.

--
           Summary: glob() crashes when trying to match too many files
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: minor
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: pasky at suse dot cz
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=3253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/3253] glob() crashes when trying to match too many files

fweimer at redhat dot com

------- Additional Comments From pasky at suse dot cz  2006-09-23 02:56 -------
Created an attachment (id=1320)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1320&action=view)
The proposed patch


--


http://sourceware.org/bugzilla/show_bug.cgi?id=3253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/3253] glob() crashes when trying to match too many files

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com

------- Additional Comments From drepper at redhat dot com  2006-09-24 17:04 -------
That patch is not acceptable.  We cannot sacrifize speed just for the sake of
some insane people.  Yes, we shouldn't crash but this doesn't mean that
reasonable requests should be slowed down.

The correct solution would use alloca only if the limit determined by
__libc_alloca_cutoff is exceeded.

--


http://sourceware.org/bugzilla/show_bug.cgi?id=3253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/3253] glob() crashes when trying to match too many files

fweimer at redhat dot com
In reply to this post by fweimer at redhat dot com

------- Additional Comments From drepper at redhat dot com  2006-09-25 15:54 -------
Should be fixed in cvs with a different patch.

--
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=3253

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.