httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56571] New: Apache 2.4: Segmentation fault with wrong reference from ap_get_module_config
Date Wed, 28 May 2014 13:00:59 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=56571

            Bug ID: 56571
           Summary: Apache 2.4: Segmentation fault with wrong reference
                    from ap_get_module_config
           Product: Apache httpd-2
           Version: 2.4.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Core
          Assignee: bugs@httpd.apache.org
          Reporter: s.shiva.p@gmail.com

Hello All,

OS: RHEL 6 64 bit machine.

Getting segmentation fault with the wrong reference pointer from
ap_get_module_config.

here while creating the ga_vs_config for module config in the code
below(vs_config apr_palloc (p, s), it's returning the address 0x8477930, but
while getting the reference from ap_get_module_config (vs_config =
(ga_vs_config *)ap_get_module_config), it's returning 0x2009 and causing
segmentation fault while assigning vsid to it (vs_config->vsid = vsid).

Note: The issue is specific to 32 bit webserver on 64 bit machine, the same is
working fine with 64 bit apache 2.4 webserver.

can you please advice on the same.

13807 - -143320688 - ga_create_server_config: no name 0x841a0a8 0x845b9f0
13807 - -143320688 - ga_create_server_config: rhel6
 0x841a0a8 0x8477930
13807 - -143320688 - cmd_gavsid: vs_config, module_index 27 0x2009 0x2009
13807 - -143320688 - cmd_gavsid: server_rec 0x84449c0
13807 - -143320688 - cmd_gavsid: server_rec->module_config 0x84449c0

typedef struct ga_vs_config
{
   char *vsid;
   char *vsname;          // Don't know if applicable yet
} ga_vs_config;


from   ga_create_server_config for creating the module config file

vs_config = (ga_vs_config *) apr_palloc (p, sizeof(ga_vs_config));



vs_config = (ga_vs_config *)ap_get_module_config((s)?s->module_config:NULL,
&ga_module);

                        if(vs_config)
                                vs_config->vsid = vsid;
                }


module AP_MODULE_DECLARE_DATA ga_module =
{
   STANDARD20_MODULE_STUFF,
      NULL,                    /* per-directory config creator */
      NULL,                    /* dir config merger */
      ga_create_server_config, /* server config creator */
      NULL,                    /* server config merger */
      ga_cmds,                 /* command table */
      ga_register_hooks,       /* set up other request processing hooks */
};

Thanks,
Shiva

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

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


Mime
View raw message