The following commit should be backported to glibc 2.15: commit 20b38e0301279a37a3f1e769843933bcc0d5f736 Author: Paul Pluzhnikov <ppluzhnikov@google.com> Date: Sun Jan 8 20:13:35 2012 -0500 sscanf always calls realloc
I am not going to backport this change to the stable 2.15 branch. This is not a correctness issue it's only a performance issue. As it stands the 2.15 branch *always* uses realloc and that is OK. I don't want to backport this patch because it would enable the use of alloca where there previously had not been such a use and I feel we haven't had enough testing to validate that this doesn't cause some unforeseen consequence. In general I'm going to avoid changes that introduce alternate memory allocations or stack usage unless those patches are for correctness. Please reopen this issue if you would like to discuss the reasons you have for wanting this backport to 2.15, for example you have a use case where this is a *serious* performance issue.