Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cm27v-0008CF-LR for pgsql-bugs@arkaria.postgresql.org; Thu, 09 Mar 2017 17:45:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cm27v-0003NI-4h for pgsql-bugs@arkaria.postgresql.org; Thu, 09 Mar 2017 17:45:23 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cm27u-0003MR-Cd for pgsql-bugs@postgresql.org; Thu, 09 Mar 2017 17:45:22 +0000 Received: from gauss.credativ.com ([93.94.130.89]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cm27i-0006ks-JN for pgsql-bugs@postgresql.org; Thu, 09 Mar 2017 17:45:21 +0000 Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id E34EC1E1971; Thu, 9 Mar 2017 18:45:05 +0100 (CET) Received: from feivel.credativ.lan (aftr-95-223-109-114.unity-media.net [95.223.109.114]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mme@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id BE4BB1E1965; Thu, 9 Mar 2017 18:45:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by feivel.credativ.lan (Postfix) with ESMTP id 246CB303; Thu, 9 Mar 2017 18:45:05 +0100 (CET) Message-ID: <1489081505.2097.28.camel@postgresql.org> Subject: Re: BUG #14582: ecpg crashes on SQL input From: Michael Meskes To: Tom Lane Cc: "Dudley, Michael" , "pgsql-bugs@postgresql.org" Date: Thu, 09 Mar 2017 18:45:05 +0100 In-Reply-To: <22575.1489077250@sss.pgh.pa.us> References: <20170308165659.25059.69634@wrigleys.postgresql.org> <1489065869.2338.11.camel@postgresql.org> <1489071407.2338.19.camel@postgresql.org> <20743.1489074536@sss.pgh.pa.us> <22575.1489077250@sss.pgh.pa.us> Organization: PostgreSQL Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.5-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org > 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