You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2010/02/17 15:16:54 UTC

DO NOT REPLY [Bug 48759] New: When trying a simple module on a 64bit Apache 2 machine, there is a segmentation fault at an early spot

https://issues.apache.org/bugzilla/show_bug.cgi?id=48759

           Summary: When trying a simple module on a 64bit Apache 2
                    machine, there is a segmentation fault at an early
                    spot
           Product: Apache httpd-2
           Version: 2.2.14
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Platform
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: alinachegalati@yahoo.com


Hi,

   I save a similar issue with the one presented here :
http://marc.info/?l=apache-modules&m=115463732419493&q=raw. When migrating my
custom module from a Solaris10 machine (where I had the apache compiled on 32
bit) to a SuSE11 one (64 bit platform, gcc and apache build on 64 bit) my
module crashes in the post_config phase with a SIGSEGV:

Program received signal SIGSEGV, Segmentation fault.
dump_config_data (p=0x6ba138, plog=0x6fc348, ptemp=0x6c0168, s=0x0) at
idu_config.c:341
341         idu_config_t *config = get_idu_module_config(s->module_config);


In post_config hook:

    idu_config_t *config = get_idu_module_config( (ap_conf_vector_t *)
s->module_config);

     config->process_pool = p;

    /* Log the module configuration to idu.log  */
    dump_config_data(p, plog, ptemp, s);

and in the module I have declared :

module AP_MODULE_DECLARE_DATA idu_module;

idu_config_t* get_idu_module_config(ap_conf_vector_t *conf_vector) {
    return (idu_config_t*) ap_get_module_config(conf_vector, &idu_module);
}

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48759] When trying a simple module on a 64bit Apache 2 machine, there is a segmentation fault at an early spot

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48759

Alin Vasile <al...@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alinachegalati@yahoo.com

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48759] When trying a simple module on a 64bit Apache 2 machine, there is a segmentation fault at an early spot

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48759

--- Comment #1 from Alin Vasile <al...@yahoo.com> 2010-02-17 14:22:11 UTC ---
Backtrace in gdb:

(gdb) backtrace
#0  dump_config_data (p=0x6ba138, plog=0x6fc348, ptemp=0x6c0168, s=0x0) at
idu_config.c:341
#1  0x00007ffff52d9316 in post_config (p=0x6ba138, plog=0x6fc348,
ptemp=0x6c0168, s=0x0) at mod_idu.c:392
#2  0x00000000004414a4 in ap_run_post_config ()
#3  0x000000000042896b in main ()

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48759] When trying a simple module on a 64bit Apache 2 machine, there is a segmentation fault at an early spot

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48759

Jeff Trawick <tr...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Jeff Trawick <tr...@apache.org> 2010-02-17 14:25:36 UTC ---
This is not the place to debug your module.
(I see from your mailing list post that you're casting the return code from
apr_pstrdup().  If that is because you don't have the proper function
prototypes included, fix that first; lack of prototypes is a common cause of
crashes in 64-bit mode when C's assumed int return value is a different size
than a pointer.  Anyway, this is the wrong place for such a discussion.)

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 48759] When trying a simple module on a 64bit Apache 2 machine, there is a segmentation fault at an early spot

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48759

--- Comment #3 from Alin Vasile <al...@yahoo.com> 2010-02-17 19:20:28 UTC ---
Thanks Jeff. Following your indications fixed the problem. I had a variable
declared as int when it should have been apr_size_t instead of  int.

-- 
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: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org