httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51371] New: wrong guards around 'apr_procattr_limit_set' in mod_cgi.c
Date Tue, 14 Jun 2011 06:38:11 GMT

             Bug #: 51371
           Summary: wrong guards around 'apr_procattr_limit_set' in
           Product: Apache httpd-2
           Version: 2.2.19
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_cgi
    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

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):

  APR_DECLARE(apr_status_t) apr_procattr_limit_set(apr_procattr_t *attr,
                                                   apr_int32_t what,
                                                   struct rlimit *limit)
  /* ... */

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) ||
  #if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
          ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_MEM,
                                        conf->limit_mem)) != APR_SUCCESS) ||
          ((rc = apr_procattr_limit_set(procattr, APR_LIMIT_NPROC,
                                        conf->limit_nproc)) != APR_SUCCESS) ||

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:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message