Re: segmentation fault when cassert enabled

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: segmentation fault when cassert enabled
Date: 2019-10-25 16:28:38
Message-ID: 18714.1572020918@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jehan-Guillaume de Rorthais <jgdr(at)dalibo(dot)com> writes:
> When investigating for the bug reported in thread "logical replication -
> negative bitmapset member not allowed", I found a way to seg fault postgresql
> only when cassert is enabled.
> ...
> I hadn't time to digg further yet. However, I don't understand why this crash
> is triggered when cassert is enabled.

Most likely, it's not so much assertions that provoke the crash as
CLOBBER_FREED_MEMORY, ie the actual problem here is use of already-freed
memory.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-10-25 16:38:05 Re: [Proposal] Arbitrary queries in postgres_fdw
Previous Message Tom Lane 2019-10-25 16:25:55 Re: define bool in pgtypeslib_extern.h