pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Mariel Cherkassky <mariel.cherkassky@gmail.com>
Cc: mark.kirkwood@catalyst.net.nz
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: sqlite_fdw crashes & errors
Date: Tue, 18 Sep 2018 14:12:46 +0100
Message-ID: <87sh27hrxj.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <CA+t6e1=hiby+-PG1gY3MwEmu9PvTQGztURej-wZuZ=iJ0HhCqg@mail.gmail.com>
References: <CA+t6e1kzja9ats3yLtLYo4jY52h-cNiMxt7zyEgQixHx=vazKQ@mail.gmail.com>
	<534fa6d9-4541-bb7d-a26c-3c021690cc4b@catalyst.net.nz>
	<CA+t6e1njA-BnjqDeAJ9gdzhhfFYhBtKsfnxceFh0BLphM=yonw@mail.gmail.com>
	<3e05aedb-987b-29aa-bb5e-e89bfd372834@catalyst.net.nz>
	<CA+t6e1=h+814eAbv=1Etq_EZ-4PhKF+3cJpi+m3ZUOAU6aGpFw@mail.gmail.com>
	<170c1a6b-651a-4ae8-6ea3-4ce1ab54275f@catalyst.net.nz>
	<CA+t6e1=PHY0S9h6mvPn6A6EFn7trUsq3+uvcx9=JfqzkthesZA@mail.gmail.com>
	<CA+t6e1kAW1wzH_ogge9E3e0yG8feM092Oh5bKjig+u3irp6nkw@mail.gmail.com>
	<CA+t6e1=hiby+-PG1gY3MwEmu9PvTQGztURej-wZuZ=iJ0HhCqg@mail.gmail.com>

>>>>> "Mariel" == Mariel Cherkassky <mariel.cherkassky@gmail.com> writes:

 >> #2  0x00007f11c1800e24 in sqlitefdw_report_error (elevel=<value optimized
 >> out> , stmt=0x20013f8, conn=<value optimized out>, 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)




view thread (18+ messages)  latest in thread

Message-ID: <87sh27hrxj.fsf@news-spur.riddles.org.uk>
Permalink:  ../87sh27hrxj.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87sh27hrxj.fsf@news-spur.riddles.org.uk

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, mariel.cherkassky@gmail.com, mark.kirkwood@catalyst.net.nz, pgsql-admin@lists.postgresql.org
  Subject: Re: sqlite_fdw crashes & errors
  In-Reply-To: <87sh27hrxj.fsf@news-spur.riddles.org.uk>

* 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