This issue has been resolved. The problem was revealed by the compiler warnings...
./mod_pikevm.c:117: warning: implicit declaration of function ‘apr_pstrdup’ The solution was to add #include "apr_strings.h" to mod_pikevm.c Best Regards, Ralph Ritoch On Fri, Nov 15, 2013 at 7:04 PM, Ralph Ritoch <[email protected]> wrote: > Hi, > > Does anyone know why apr_pstrdup(r->connection->pool, "http"); would be > returning 0x0? > > It is causing a segfault in the module I'm developing > > @ > https://github.com/rritoch/PikeVM/blob/master/root/boot/system-1.1/apache/src/mod_pikevm.c#L585 > > Here is the relevant gdb output.... > > 581 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > (gdb) n > 585 uri->scheme = apr_pstrdup(r->connection->pool, "http"); > (gdb) p status > No symbol "status" in current context. > (gdb) p uri->scheme > $1 = 0x0 > (gdb) p uri > $2 = (apr_uri_t *) 0x7ffff832c198 > (gdb) p r->connection->pool > $3 = (apr_pool_t *) 0x7ffff832b4e8 > (gdb) n > 588 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, > (gdb) p uri->scheme > $4 = 0x0(gdb) s > ap_log_error (file=0x7fffed888a0a "./mod_pikevm.c", line=588, level=7, > status=0, s=0x7ffff8212880, fmt=0x7fffed888b6e "pikevm: %s: Scheme set > %s") > at /usr/src/debug/httpd-2.2.15/server/log.c:711 > 711 { > (gdb) n > 714 va_start(args, fmt); > (gdb) n > 715 log_error_core(file, line, level, status, s, NULL, NULL, NULL, > fmt, args); > (gdb) n > 714 va_start(args, fmt); > (gdb) n > 715 log_error_core(file, line, level, status, s, NULL, NULL, NULL, > fmt, args); > (gdb) n > 714 va_start(args, fmt); > (gdb) n > 715 log_error_core(file, line, level, status, s, NULL, NULL, NULL, > fmt, args); > (gdb) n > > Program received signal SIGSEGV, Segmentation fault. > __strlen_sse2 () at ../sysdeps/x86_64/strlen.S:32 > 32 movdqu (%rdi), %xmm1 > (gdb) > > > > Any assistance that you can provide would be appreciated. > > Best Regards, > Ralph Ritoch > > > >
