Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8QJq-0001mF-IB for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Oct 2018 13:39:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g8QJo-0004xO-Nf for pgsql-bugs@arkaria.postgresql.org; Fri, 05 Oct 2018 13:39:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8QJo-0004xH-HN for pgsql-bugs@lists.postgresql.org; Fri, 05 Oct 2018 13:39:00 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g8QJk-0005Xd-Ua for pgsql-bugs@lists.postgresql.org; Fri, 05 Oct 2018 13:38:59 +0000 Received: from [192.168.127.1] (port=56173 helo=caithnard.riddles.org.uk) by lungold.riddles.org.uk with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.88 (FreeBSD)) (envelope-from ) id 1g8QJh-0008eG-CN; Fri, 05 Oct 2018 13:38:53 +0000 Received: from [127.0.0.1] (port=44201 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1g8QJg-000J73-MI; Fri, 05 Oct 2018 13:38:52 +0000 From: Andrew Gierth To: Pavel Stehule Cc: Sergey Mirvoda , Andrey Borodin , Andrew Borodin , Michael Paquier , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15420: Server crash. Segmentation fault when parsing xml file In-Reply-To: (Pavel Stehule's message of "Fri, 5 Oct 2018 15:26:59 +0200") Message-ID: <87tvm0bjpt.fsf@news-spur.riddles.org.uk> References: <15420-6648d2ed070c05d4@postgresql.org> <20181004091103.GC1256@paquier.xyz> <0FD7884D-E9D9-41DF-AA05-15E7420F996A@yandex-team.ru> <87tvm1cbkk.fsf@news-spur.riddles.org.uk> <87pnwpc7wi.fsf@news-spur.riddles.org.uk> <87y3bcbkcm.fsf@news-spur.riddles.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Fri, 05 Oct 2018 14:38:52 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Pavel" == Pavel Stehule writes: >> I don't yet know about 2.9.8, but the crash with 2.9.4 is a bug in >> libxml2's error handling which has _nothing to do_ with which API >> you use. Read the analysis I posted. Pavel> ok. Probably there are more than one issue. 1. crash, 2. raising Pavel> huge input lookup, maybe other. It's certainly possible that the error that provokes the crash is libxml2 complaining that the tag name is too long or whatever. Pavel> libxml2 is great library, HAH. From reading the code, as I have been for much of today, it's pretty damn bad. Interestingly, the FreeBSD package build of PG now disables XML by default on account of libxml2's very poor security record. We need a better XML library :-( -- Andrew.