[Bug libc/3253] New: glob() crashes when trying to match too many files
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
AssignedTo: drepper at redhat dot com
ReportedBy: pasky at suse dot cz
CC: glibc-bugs at sources dot redhat dot com
[Bug libc/3253] glob() crashes when trying to match too many files
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.