Bug 13752 - [2.15 backport] scanf always calls realloc
Summary: [2.15 backport] scanf always calls realloc
Status: RESOLVED WONTFIX
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.15
: P2 normal
Target Milestone: ---
Assignee: Carlos O'Donell
URL:
Keywords: glibc_2.15
Depends on:
Blocks:
 
Reported: 2012-02-25 01:30 UTC by Allan McRae
Modified: 2014-06-26 14:37 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allan McRae 2012-02-25 01:30:56 UTC
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
Comment 1 Carlos O'Donell 2012-05-02 01:48:27 UTC
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.