On 23.11.2018 13:25, Nick Kew wrote:
>> Please help me to solve this.
> It looks as if your pool could be in charge of memory that something else
> already freed.
>
> Possible causes of that lie outside the scope of what you posted. And
> probably outside
> the scope of APR.
The most common cause of such errors are mistakes in lifetime
management, when an object A allocated from pool P contains a pointer to
object B allocated from S, which is a subpool of P ... and then the
cleanup function expects A->B to be valid.
The solution in such cases is to use apr_pool_pre_cleanup_register()
instead of apr_pool_cleanup_register(). Or, of course, to fix wrong
assumptions in the cleanup function.
-- Brane