Re: zero size ошибка при добавлении текста в body filter
Maxim Dounin
mdounin на mdounin.ru
Вт Фев 7 08:56:57 UTC 2012
Hello!
On Mon, Feb 06, 2012 at 08:43:55PM -0500, mishalunin wrote:
> и при передаче цепочки из ngx_output_chain тоже
> что-то не так:
>
>
> 66 return ctx->output_filter(ctx->filter_ctx, in);
> (gdb) p *(in->buf)
> $1 = {pos = 0x0, last = 0x0, file_pos = 0, file_last = 6506, start =
> 0x0,
> end = 0x0, tag = 0x0, file = 0x8ac1c4c, shadow = 0x0, temporary = 0,
> memory = 0, mmap = 0, recycled = 0, in_file = 1, flush = 0, sync = 0,
>
> last_buf = 1, last_in_chain = 1, last_shadow = 0, temp_file = 0, num =
> 0}
> (gdb) step
> ngx_http_my_body_filter (r=0x8ac1048, in=0xbf86de74)
> at /home/me/workspace/nginx_module/ngx_http_my_module.c:104
> 104 {
> (gdb) p *(in->buf)
> $2 = {pos = 0x0, last = 0x0, file_pos = 0, file_last = 0,
> start = 0x196a <Address 0x196a out of bounds>, end = 0x0, tag = 0x0,
> file = 0x0, shadow = 0x0, temporary = 0, memory = 0, mmap = 1,
> recycled = 1, in_file = 0, flush = 0, sync = 1, last_buf = 0,
> last_in_chain = 0, last_shadow = 0, temp_file = 1, num = 0}
Начните с простого - соберитесь без оптимизации (i.e. с -O0).
Maxim Dounin
Подробная информация о списке рассылки nginx-ru