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 1g2FoP-0003Yu-7O for pgsql-admin@arkaria.postgresql.org; Tue, 18 Sep 2018 13:13:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g2FoL-0003Zp-1t for pgsql-admin@arkaria.postgresql.org; Tue, 18 Sep 2018 13:13:01 +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.89) (envelope-from ) id 1g2FoK-0003Zf-N6 for pgsql-admin@lists.postgresql.org; Tue, 18 Sep 2018 13:13:00 +0000 Received: from lungold.riddles.org.uk ([82.68.208.19]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g2FoD-0001sa-3m for pgsql-admin@lists.postgresql.org; Tue, 18 Sep 2018 13:12:59 +0000 Received: from [192.168.127.1] (port=23446 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 1g2Fo7-000NJ7-98; Tue, 18 Sep 2018 13:12:47 +0000 Received: from [127.0.0.1] (port=30608 helo=caithnard.riddles.org.uk) by caithnard.riddles.org.uk with esmtp (Exim 4.89 (FreeBSD)) (envelope-from ) id 1g2Fo6-000LpX-KP; Tue, 18 Sep 2018 13:12:46 +0000 From: Andrew Gierth To: Mariel Cherkassky Cc: mark.kirkwood@catalyst.net.nz, pgsql-admin@lists.postgresql.org Subject: Re: sqlite_fdw crashes & errors In-Reply-To: (Mariel Cherkassky's message of "Tue, 18 Sep 2018 15:35:11 +0300") Message-ID: <87sh27hrxj.fsf@news-spur.riddles.org.uk> References: <534fa6d9-4541-bb7d-a26c-3c021690cc4b@catalyst.net.nz> <3e05aedb-987b-29aa-bb5e-e89bfd372834@catalyst.net.nz> <170c1a6b-651a-4ae8-6ea3-4ce1ab54275f@catalyst.net.nz> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) Date: Tue, 18 Sep 2018 14:12:46 +0100 MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk >>>>> "Mariel" == Mariel Cherkassky writes: >> #2 0x00007f11c1800e24 in sqlitefdw_report_error (elevel=> out> , stmt=0x20013f8, conn=, sql=0x0, rc=1) at >> connection.c:288 This is a bug in sqlite_fdw - it's assuming it can use sqlite3_sql to get the sql source text back from a statement, but that's only true when the statement was prepared using a different API than the one actually being used. So sqlite3_sql ends up returning null, and pstrdup naturally crashes on that. -- Andrew (irc:RhodiumToad)