Re:Re: Re: Re: fix accidental corrdump

2022-09-29 Thread zjd
g " l->alloc is not used after free(). " Clearly, >> that is not true if setting it to NULL prevents the segfault. What is true >> is that NGINX core code does not use it. As a defensive coding technique, >> I agree with zjd that setting the pointer you just freed t

Re:Re: Re: fix accidental corrdump

2022-09-29 Thread zjd
sh maybe reuse l->alloc's address, and ngx_array_push is not memzero from the start of get memory. So I think l->alloc=NULL after free(l-alloc) is necessary. Thanks for discussing this with me At 2022-09-29 00:03:24, "Maxim Dounin" wrote: >Hello! > >On We

Re:Re: fix accidental corrdump

2022-09-27 Thread zjd
m Dounin" wrote: >Hello! > >On Tue, Sep 27, 2022 at 03:25:18PM +0800, zjd wrote: > >> # HG changeset patch >> # User Zhang Jinde >> # Date 1664261587 -28800 >> # Tue Sep 27 14:53:07 2022 +0800 >> # Node ID 226a75a3703db612ed13d4357ac1b71faef6974a >&g

fix accidental corrdump

2022-09-27 Thread zjd
# HG changeset patch # User Zhang Jinde # Date 1664261587 -28800 # Tue Sep 27 14:53:07 2022 +0800 # Node ID 226a75a3703db612ed13d4357ac1b71faef6974a # Parent ba5cf8f73a2d0a3615565bf9545f3d65216a0530 Core: fix ngx_reset_pool wild pointer's coredump When frequently use ngx_reset_pool