pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dudley, Michael <mdudley@gryphonsensors.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14582: ecpg crashes on SQL input
Date: Thu, 09 Mar 2017 18:45:05 +0100
Message-ID: <1489081505.2097.28.camel@postgresql.org> (raw)
In-Reply-To: <22575.1489077250@sss.pgh.pa.us>
References: <20170308165659.25059.69634@wrigleys.postgresql.org>
	<1489065869.2338.11.camel@postgresql.org>
	<MWHPR05MB3486D9AB01252062ABC3694ACD210@MWHPR05MB3486.namprd05.prod.outlook.com>
	<1489071407.2338.19.camel@postgresql.org>
	<20743.1489074536@sss.pgh.pa.us>
	<22575.1489077250@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (8+ messages)

Message-ID: <1489081505.2097.28.camel@postgresql.org>
Permalink:  ../1489081505.2097.28.camel@postgresql.org/
Also on:    postgresql.org/message-id/1489081505.2097.28.camel@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: meskes@postgresql.org, tgl@sss.pgh.pa.us, mdudley@gryphonsensors.com
  Subject: Re: BUG #14582: ecpg crashes on SQL input
  In-Reply-To: <1489081505.2097.28.camel@postgresql.org>
  References: <20170308165659.25059.69634@wrigleys.postgresql.org> <1489065869.2338.11.camel@postgresql.org> <MWHPR05MB3486D9AB01252062ABC3694ACD210@MWHPR05MB3486.namprd05.prod.outlook.com> <1489071407.2338.19.camel@postgresql.org> <20743.1489074536@sss.pgh.pa.us> <22575.1489077250@sss.pgh.pa.us> <1489081505.2097.28.camel@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox