httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Bertola <>
Subject Re: splitting a string...
Date Tue, 02 Jan 2007 09:14:51 GMT
Joachim Zobel wrote:
> Am Montag, den 01.01.2007, 06:18 -0800 schrieb Drew Bertola:
>> This generates segfaults when processing php and doesn't help with my
>> problem.   Is the problem due to filter order?
> To find out more about the segf's do 
[snip - thanks]

I'm confused about the cause of the segfaults.  Here's what gdb is
showing me (again, only for php files)...

tail end of gdb /usr/sbin/httpd core.xxxxx:

Loaded symbols for /usr/lib/
Failed to read a valid object file image from memory.
Core was generated by `/usr/sbin/httpd'.
Program terminated with signal 11, Segmentation fault.
#0  0x00000058 in ?? ()

and the full backtrace shows:

#0  0x00000058 in ?? ()
No symbol table info available.
#1  0x001347bf in lt_insert_filter (f=0xa0cbd30, bb=0xa0cc168)
    at lt_insert.c:91
        len = 4104
        str = 0xa0d3cb4 "000108 nothing just filling up space,\n000109
nothing just filling up space,\n000110 nothing just filling up
space,\n000111 nothing just filling up space,\n000112 nothing just
filling up space,\n000113 not"...
        position = <value optimized out>
        i = 4123
        ctx = (lt_insert_struct *) 0xa0cc188
        e = (apr_bucket *) 0xa0cc194
#2  0x007b8f60 in ap_pass_brigade () from /usr/sbin/httpd
No symbol table info available.

line 91 looks like this: 

      apr_bucket_read(e, &str, &len, APR_NONBLOCK_READ);

Also, it only happens if I use

          APR_BRIGADE_INSERT_TAIL(ctx->bb, e);

rather than

          i = 0;
          while ( i < len )
              ap_fputc(f->next, ctx->bb, str[i++]);

which works well, but, as you note, is a bit expensive.

I'd love to get my hands on a well written "null_output_filter_module".


View raw message