Mod_layout 3.2.1 segfaults on Mac OS X and Sparc with DEBUG enabled

"ruda\.moura" <[email protected]> Tue, 20 Mar 2007 12:23:25 -0300
Newsgroups gmane.comp.apache.mod-layout
Message-ID <JF7K31$70849CB1FB18EFD6B00AF2045F9F5262@multidominios>
Hello there!

It's impossible to compile and use mod_layout 3.2.1 on Mac OS X or Solaris with -DDEBUG option enabled. This module gots 
segfault in function merge_dir_mconfig. What I've got with GDB is:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000008
0x000cb0d4 in merge_dir_mconfig (p=0x183420c, origin=0x1815514, new=0x181c484) at mod_layout.c:248
248             printf("MERGED %d were from origin, %d were new, and %d came out the backend\n", cfg_origin->layouts->nelts,  
cfg_new->layouts->nelts, cfg->layouts->nelts);
(gdb) 
Continuing.

and the backtrace is:

(gdb) bt
#0  0x000cb0d4 in merge_dir_mconfig (p=0x183640c, origin=0x1815514, new=0x181c484) at mod_layout.c:248
#1  0x000055fe in ap_merge_per_dir_configs ()
#2  0x00018793 in directory_walk ()
#3  0x00019073 in process_request_internal ()
#4  0x000199c4 in ap_process_request ()
#5  0x000101e3 in child_main ()
#6  0x0001066e in make_child ()
#7  0x000107b2 in startup_children ()
#8  0x0001115b in standalone_main ()
#9  0x0001253c in main ()

I don't have time to hack on this, so at least I'm posting this is as an advice for other developers and users.

--
Rudá Moura <[email protected]>
Terra Networks Brasil