Those structures should remain 'const'. Please don't apply this patch.

Thanks,
-g

On Tue, Jun 10, 2003 at 07:33:27PM -0400, MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) 
wrote:
> I think we've identified the problem (.. and a solution too). The problem
> was because of a faulty compiler.
> 
> For those interested in knowing more about the problem : the bug shows up
> when we forward declare a structure, and the compiler doesn't manage the
> literals properly.
> 
> The following patch helped fix the segv problem (but, the real fix is in the
> compiler)
> 
> --- repos.c@@/main/5    Tue Apr  1 17:55:55 2003
> +++ repos.c     Tue Jun 10 16:21:30 2003
> @@ -134,8 +134,8 @@
>  extern const dav_hooks_locks dav_hooks_locks_fs;
>  
>  /* forward-declare the hook structures */
> -static const dav_hooks_repository dav_hooks_repository_fs;
> -static const dav_hooks_liveprop dav_hooks_liveprop_fs;
> +static dav_hooks_repository dav_hooks_repository_fs;
> +static dav_hooks_liveprop dav_hooks_liveprop_fs;
>  
>  /*
>  ** The namespace URIs that we use. This list and the enumeration must
> @@ -1795,7 +1795,7 @@
>      return apr_psprintf(ctx->pool, "\"%lx\"", (unsigned long)
> ctx->finfo.mtime);
>  }
>  
> -static const dav_hooks_repository dav_hooks_repository_fs =
> +static dav_hooks_repository dav_hooks_repository_fs =
>  {
>      DEBUG_GET_HANDLER,   /* normally: special GET handling not required */
>      dav_fs_get_resource,
> @@ -2080,7 +2080,7 @@
>  }
>  
>  
> -static const dav_hooks_liveprop dav_hooks_liveprop_fs =
> +static dav_hooks_liveprop dav_hooks_liveprop_fs =
>  {
>      dav_fs_insert_prop,
>      dav_fs_is_writable,
> 
> 
> Thanks
> -Madhu
> 
> >-----Original Message-----
> >From: MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, June 10, 2003 2:42 PM
> >To: '[EMAIL PROTECTED]'
> >Subject: Help with DAV SEGV
> >
> >
> >Hi,
> >     I'm running the litmus test for WebDAV (with Apache 2.0.46), and
> >seeing a strange behaviour. The tests pass for 64-bit (PA-RISC 
> >arch., OS Ver
> >11.23 / 11.11), 64-bit (IA64 arch., OS Ver 11.22), but dumps 
> >core on 64-bit
> >(IA64 OS Ver 11.23). (The same tests were passing with 2.0.45)
> >
> >Any idea what might be happening ?.
> >
> >(gdb) where
> >#0  0x0 in <unknown_procedure> ()
> >warning: Attempting to unwind past bad PC 0x0 
> >#1  0xc000000001e4ac90:0 in dav_get_resource (r=0x60000000001ebf50, 
> >    label_allowed=0, use_checked_in=0, res_p=0x8fffffffef5f8f50)
> >    at mod_dav.c:705
> >#2  0xc000000001e4c6b0:0 in dav_method_delete (r=0x60000000001ebf50)
> >    at mod_dav.c:1086
> >#3  0xc000000001e5c7a0:0 in dav_handler (r=0x60000000001ebf50)
> >    at mod_dav.c:4512
> >#4  0x400000000005fe80:0 in ap_run_handler+0x120 ()
> >#5  0x4000000000061560:0 in ap_invoke_handler+0x2f0 ()
> >#6  0x4000000000051d80:0 in ap_process_request+0x90 ()
> >#7  0x40000000000429b0:0 in ap_process_http_connection+0x100 ()
> >#8  0x4000000000081230:0 in ap_run_process_connection+0x120 ()
> >#9  0x4000000000081d50:0 in ap_process_connection+0xf0 ()
> >#10 0x4000000000055740:0 in process_socket+0x1d0 ()
> >#11 0x4000000000056d80:0 in worker_thread+0x410 ()
> >#12 0xc000000001cb8480:0 in dummy_worker+0x70 ()
> >   from /opt/hpws/apache/lib/libapr-0.9
> >#13 0xc0000000000b4ae0:0 in __pthread_unbound_body+0x4a0 ()
> >   from /usr/lib/hpux64/libpthread.so.1
> >(gdb) p *conf
> >$1 = {provider_name = 0xc000000001e43440 "filesystem", 
> >  provider = 0x8fffffffef7213f0, 
> >  dir = 0x6000000000072538 "/opt/hpws/apache/htdocs", locktimeout = 0, 
> >  allow_depthinfinity = 0}
> >(gdb) p *conf->provider
> >$2 = {repos = 0xc000000001ea9610, propdb = 0x8fffffffef721120, 
> >  locks = 0x8fffffffef721290, vsn = 0x0, binding = 0x0, search = 0x0, 
> >  ctx = 0x0}
> >(gdb) p *conf->provider->repos
> >$3 = {handle_get = 0, get_resource = 0, get_parent_resource = 0, 
> >  is_same_resource = 0, is_parent_resource = 0, open_stream = 0, 
> >  close_stream = 0, write_stream = 0, seek_stream = 0, 
> >set_headers = 0, 
> >  deliver = 0, create_collection = 0, copy_resource = 0, 
> >move_resource = 0, 
> >  remove_resource = 0, walk = 0, getetag = 0, ctx = 0x0}
> >

-- 
Greg Stein, http://www.lyra.org/

Reply via email to