Bug 54572 - [PATCH] move struct crypt_data allocation to heap in apr_password_validate
Summary: [PATCH] move struct crypt_data allocation to heap in apr_password_validate
Status: RESOLVED FIXED
Alias: None
Product: APR
Classification: Unclassified
Component: APR-util (show other bugs)
Version: HEAD
Hardware: PC Linux
: P2 minor (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2013-02-17 16:34 UTC by Remi Gacogne
Modified: 2013-04-05 20:25 UTC (History)
0 users



Attachments
[PATCH] move struct crypt_data allocation to heap in apr_password_validate (2.11 KB, patch)
2013-02-17 16:34 UTC, Remi Gacogne
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remi Gacogne 2013-02-17 16:34:45 UTC
Created attachment 29959 [details]
[PATCH] move struct crypt_data allocation to heap in apr_password_validate

Hi,

When compiled with CRYPT_R_STRUCT_CRYPT_DATA defined, the apr_password_validate function allocates a struct crypt_data variable on the stack. The crypt_data struct is a GNU extension, whose glibc's version has a size of roughly 128k.

This patch against the apr trunk changes the stack-based allocation of this variable to a heap-based one.

We use Apache HTTPd 2.2.23 / APR 1.4.6 with the worker mpm, and this function was the only thing preventing us to set the ThreadStackSize at 128k (131072). I am aware that some common modules are not playing well with such a low stack size, but in our case everything is working fine with this patch applied.


Regards,

Remi Gacogne
Aqua Ray SAS
Comment 1 Stefan Fritsch 2013-03-23 22:23:58 UTC
trunk commit: r1460243
Comment 2 Stefan Fritsch 2013-03-24 08:02:31 UTC
1.5 commit: r1460279
Comment 3 Stefan Fritsch 2013-04-05 20:25:47 UTC
fixed in 1.5.2