https://issues.apache.org/bugzilla/show_bug.cgi?id=51371
Bug #: 51371
Summary: wrong guards around 'apr_procattr_limit_set' in
mod_cgi.c
Product: Apache httpd-2
Version: 2.2.19
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_cgi
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
I have other configuration issues I need to sort out, but this is a problem
with the core code in a clean 2.2.19 build.
The symptom is an undefined reference to apr_procattr_limit_set when trying to
link mod_cgi.so.
In srclib/apr/threadproc/unix/proc.c, the definition of apr_procattr_limit_set
is guarded by APR_HAVE_STRUCT_RLIMIT (at about line 670):
#if APR_HAVE_STRUCT_RLIMIT
APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
apr_int32_t what,
struct rlimit *limit)
{
/* ... */
}
#endif /* APR_HAVE_STRUCT_RLIMIT */
But it's used in modules/generators/mod_cgi.c with only RLIMIT_CPU,
RLIMIT_DATA, or RLIMIT_NPROC guards (at about line 429):
#ifdef RLIMIT_CPU
((rc = apr_procattr_limit_set(procattr, APR_LIMIT_CPU,
conf->limit_cpu)) != APR_SUCCESS) ||
#endif
#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
((rc = apr_procattr_limit_set(procattr, APR_LIMIT_MEM,
conf->limit_mem)) != APR_SUCCESS) ||
#endif
#ifdef RLIMIT_NPROC
((rc = apr_procattr_limit_set(procattr, APR_LIMIT_NPROC,
conf->limit_nproc)) != APR_SUCCESS) ||
#endif
The obvious fix is to just add APR_HAVE_STRUCT_RLIMIT guards around that bit,
but there might be something non-obvious going on.
This might also be related to bug 40287, but I don't have the resources to pull
out the 2.0 codebase and verify.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]