The bug is pretty obvious looking at the backtrace, but I think
uri_meets_conditions() is probably entirely wrong. For example:

    /* Compare the hostnames */
    if(filter.hostname) {
        if (!url.hostname) {
            return 0;
        }
        else if (strcasecmp(filter.hostname, url.hostname)) {
            return 0;
        }
    }

If filter.hostname is NULL we don't check it against url.hostname being
NULL too, is this right ?

The backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912499703168 (LWP 619)]
0x0000003703470004 in strncmp () from /lib64/tls/libc.so.6
(gdb) bt
#0  0x0000003703470004 in strncmp () from /lib64/tls/libc.so.6
#1  0x00000000004421a5 in uri_meets_conditions (filter=
      {scheme = 0x0, hostinfo = 0x0, user = 0x0, password = 0x0, hostname = 
0x0, port_str = 0x0, path = 0x651800 "/", query = 0x0, fragment = 0x0, hostent 
= 0x0, port = 0, is_initialized = 1, dns_looked_up = 0, dns_resolved = 0}, 
pathlen=1, url=
            {scheme = 0x6c2800 "http", hostinfo = 0x6c2808 "login.yahoo.com", 
user = 0x0, password = 0x0, hostname = 0x6c2818 "login.yahoo.com", port_str = 
0x0, path = 0x0, query = 0x0, fragment = 0x0, hostent = 0x0, port = 0, 
is_initialized = 1, dns_looked_up = 0, dns_resolved = 0})
    at cache_util.c:71
#2  0x000000000044237b in ap_cache_get_providers (r=0x6c11b8, conf=0x666840, 
uri=
          {scheme = 0x6c2800 "http", hostinfo = 0x6c2808 "login.yahoo.com", 
user = 0x0, password = 0x0, hostname = 0x6c2818 "login.yahoo.com", port_str = 
0x0, path = 0x0, query = 0x0, fragment = 0x0, hostent = 0x0, port = 0, 
is_initialized = 1, dns_looked_up = 0, dns_resolved = 0})
    at cache_util.c:85
#3  0x000000000044012e in cache_url_handler (r=0x6c11b8, lookup=0) at 
mod_cache.c:71
#4  0x0000000000434d71 in ap_run_quick_handler (r=0x6c11b8, lookup=0) at 
config.c:160
#5  0x000000000046677f in ap_process_request (r=0x6c11b8) at http_request.c:254
#6  0x00000000004642fd in ap_process_http_connection (c=0x6b9368) at 
http_core.c:171
#7  0x000000000043b3f3 in ap_run_process_connection (c=0x6b9368) at 
connection.c:43
#8  0x0000000000477de0 in child_main (child_num_arg=Variable "child_num_arg" is 
not available.
    ) at prefork.c:640
#9  0x00000000004780a6 in make_child (s=0x5c5098, slot=0) at prefork.c:680
#10 0x0000000000478667 in ap_mpm_run (_pconf=Variable "_pconf" is not available.
    ) at prefork.c:956
#11 0x0000000000422b25 in main (argc=4, argv=0x7fffffccad28) at main.c:712

Reply via email to