Re: Re: Re: Re: fix accidental corrdump

2022-09-30 Thread Maxim Dounin
Hello! On Fri, Sep 30, 2022 at 12:07:47PM +0800, zjd wrote: > If disturb everyone, I'm sorry. > > l->alloc itself address(&l->alloc) in the pool can be reused > rather than l->alloc pointer to wild address, &l->alloc return > to pool. > And I try only use large memory with Maxim's way, but it

Re:Re: Re: Re: fix accidental corrdump

2022-09-29 Thread zjd
If disturb everyone, I'm sorry. l->alloc itself address(&l->alloc) in the pool can be reused rather than l->alloc pointer to wild address, &l->alloc return to pool. And I try only use large memory with Maxim's way, but it's not coredump. Because coredump is accident, not coredump maybe be reaso

Re: Re: Re: fix accidental corrdump

2022-09-29 Thread Maxim Dounin
Hello! On Thu, Sep 29, 2022 at 04:37:24PM -0400, Frank Swasey wrote: > This is getting quite tiresome. You are both stuck in your point of view > and refusing to hear what the other one is saying. > > Maxim - you keep repeating " l->alloc is not used after free(). " Clearly, > that is not true

Re: Re: Re: fix accidental corrdump

2022-09-29 Thread Frank Swasey
This is getting quite tiresome. You are both stuck in your point of view and refusing to hear what the other one is saying. Maxim - you keep repeating " 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 co

Re: Re: Re: fix accidental corrdump

2022-09-29 Thread Maxim Dounin
Hello! On Thu, Sep 29, 2022 at 04:30:45PM +0800, zjd wrote: > Actually, I'm not sure where is coredump; So I think > l->alloc=NULL after free(l-alloc) is reasonable, because > l->alloc's address can be reused in the pool. Of course, > memzero after get mem from the pool can be solved abo

Re:Re: Re: fix accidental corrdump

2022-09-29 Thread zjd
Actually, I'm not sure where is coredump; So I think l->alloc=NULL after free(l-alloc) is reasonable, because l->alloc's address can be reused in the pool. Of course, memzero after get mem from the pool can be solved about this question.But for example, ngx_array_push maybe reuse l->alloc'

Re: Re: fix accidental corrdump

2022-09-28 Thread Maxim Dounin
Hello! On Wed, Sep 28, 2022 at 10:56:15AM +0800, zjd wrote: > my module is such: > The pool is created with ngx_create_pool in > module_init_process; I get momery from the pool in the start of > each request, and then use ngx_reset_pool in the end of each > request. > The ngx_reset_pool tak

Re:Re: fix accidental corrdump

2022-09-27 Thread zjd
my module is such: The pool is created with ngx_create_pool in module_init_process; I get momery from the pool in the start of each request, and then use ngx_reset_pool in the end of each request. The ngx_reset_pool take pool->large each alloc pointer return to pool, and each alloc pointer

Re: fix accidental corrdump

2022-09-27 Thread Maxim Dounin
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 > # Parent ba5cf8f73a2d0a3615565bf9545f3d65216a0530 > Core: fix ngx_res

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