Re: BUG #14582: ecpg crashes on SQL input

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Dudley, Michael" <mdudley(at)gryphonsensors(dot)com>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14582: ecpg crashes on SQL input
Date: 2017-03-09 17:45:05
Message-ID: 1489081505.2097.28.camel@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> After some googling, the answer seems to be that glibc's detection of
> double free() is really unreliable for small chunks.  It will
> basically
> only notice an extra free of the same chunk most recently freed
> within a
> given bin (size range).  Since in the problem at hand there are
> probably
> unrelated free's happening between the two free's mentioning the same
> chunk, it's quite easy for it to miss the error.  I'm still a bit
> unsure
> why I see the crash in 9.6 but not HEAD, because there's very little
> difference between them, but I no longer feel that we need to
> investigate
> more closely.

On my system I don't see this segfault at all, unless I run it under
valgrind.

> This all suggests that it might be worth testing ecpg with a
> debugging
> malloc library that has more robust error detection ...

I sometimes do. However, the library is more important imo, a leak in a
short running application like ecpg itself does not do too much harm.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Kieran McCusker 2017-03-09 18:14:49 Re: BUG #14583: plpythonu : subprocess not working in function
Previous Message Tom Lane 2017-03-09 16:34:10 Re: BUG #14582: ecpg crashes on SQL input