apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53363] New: 32-bit httpd (Apache 2.4.2 with APR 1.4.6) process is crashing at "apr_pstrdup" on Suse Linux 11 (64-bit) OS.
Date Tue, 05 Jun 2012 10:19:46 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53363

          Priority: P2
            Bug ID: 53363
          Assignee: bugs@apr.apache.org
           Summary: 32-bit httpd (Apache 2.4.2 with APR 1.4.6) process is
                    crashing at "apr_pstrdup" on Suse Linux 11 (64-bit)
                    OS.
          Severity: critical
    Classification: Unclassified
                OS: Linux
          Reporter: varch03@ca.com
          Hardware: PC
            Status: NEW
           Version: 1.4.6
         Component: APR
           Product: APR

I installed Apache2.4.2 (with APR 1.4.6 & APR-Util 1.4.1) in 32-bit mode on
Suse Linux 11 (64-bit) OS. I plugged-in my custom module by adding the below
lines to "httpd.conf" file.
LoadModule sm_module "/opt/CA/webagent/bin/libmod_sm24.so"
SmInitFile "/apache24_32/conf/WebAgent.conf"

I registered "SmInitFile" command as shown below:
----------------------------------------------------------------------------
const command_rec sm_auth_cmds[] =
{

    AP_INIT_TAKE1("SmInitFile",
                    reinterpret_cast<const char* (*const)
()>(set_webagentconfpath),
                    NULL,
                    RSRC_CONF,
                    "Full path to WebAgent.conf (e.g.
/opt/netegrity/siteminder/conf/WebAgent.conf)"),
    AP_INIT_ITERATE("SmAddInputFilter",
                    reinterpret_cast<const char* (*const)
()>(SmAddThirdPartyInputFilter),
                    NULL,
                    RSRC_CONF,
                    "One or more third party filters to add to the input filter
stack before pre-fetch, delimited by a space"),
    { NULL }
};


extern "C" module AP_MODULE_DECLARE_DATA sm_module =
{
    STANDARD20_MODULE_STUFF,
    create_sm_dir_config,   /* per directory config creator */
    NULL,                   /* dir config merger */
    create_sm_server_config,/* per server config creator */
    NULL,                   /* server config merger */
    sm_auth_cmds,           /* command table */
    sm_register_hooks
};
-----------------------------------------------------------------------------

In "set_webagentconfpath" method, I am trying to duplicate the config path
given in "httpd.conf" file ("/apache24_32/conf/WebAgent.conf"). The code for
"set_webagentconfpath" is shown below. This string copy operation is crashing
in "apr_palloc" method.
-----------------------------------------------------------------------------
extern "C" const char *set_webagentconfpath(cmd_parms *cmd, void *smdirconf,
const char *szConfPath)
{
    if (szConfPath == NULL)
        return "SmInitFile command not found in Apache configuration file.";

    sm_server_config_struct *smserverconf = (sm_server_config_struct *)
ap_get_module_config(cmd->server->module_config, &sm_module);
    smserverconf->szConfigFile = apr_pstrdup(cmd->pool,szConfPath);

    g_sConfigPath = szConfPath;

    return NULL;
}
------------------------------------------------------------------------------

Apache 2.2.16 (in both 32-bit & 64-bit) & Apache 2.4.2 (in 64-bit only) is
working fine on Suse Linux11 (64-bit) OS with my custom module. Core file and
call stack screen shot is attached. Please let me know why this crash came?

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message