This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: why Glibc does use alloca?


On 05/16/2014 12:11 PM, Jeff Law wrote:
>> There is additional dull knife risk. If alloca is not available then
>> users that want performance will replace it with 64k arrays and malloc
>> fallback which makes overflow more likely.
> I'd hope patch review would catch this kind of sillyness.

I believe Ondrej is talking about user applications. Even if glibc were
fixed, and we banned alloca everywhere, users would simply start using
large arrays to optimize their code. What we really want is alloca with
some light instrumentation and checking. Sure we can ban it in glibc, but
that's just the tip of the iceberg.

Does that make sense?

Cheers,
Carlos.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]