[BUG] New memory invalid read regression in resolver since nginx 1.7.5

Maxim Dounin mdounin at mdounin.ru
Wed Oct 1 00:36:19 UTC 2014


Hello!

On Tue, Sep 30, 2014 at 03:51:40PM -0700, Yichun Zhang (agentzh) wrote:

> Hello!
> 
> On Tue, Sep 30, 2014 at 3:10 PM, Yichun Zhang (agentzh) wrote:
> >     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
> >                    "event timer del: %d: %M",
> >                     ngx_event_ident(ev->data), ev->timer.key);
> >
> 
> There is another issue here: it seems that ngx_event_ident() assumes
> ev->data is an ngx_connection_t pointer:
> 
>     #define ngx_event_ident(p)  ((ngx_connection_t *) (p))->fd
> 
> But in fact, ev->data can point to any thing. Maybe it makes more
> sense to just output the pointer value of ev->data here?
> 
> How about the following patch?

With such a change timer idents will become much less readable 
for connection-related timers (that is, most of them), so this 
is a last resort.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list