pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <aekorotkov@gmail.com>
To: Paul A Jungwirth <pj@illuminatedcomputing.com>
Cc: exclusion@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17300: Server crashes on deserializing text multirange
Date: Wed, 01 Dec 2021 17:39:55 -0500
Message-ID: <2001128.1638398395@sss.pgh.pa.us> (raw)
In-Reply-To: <17300-dced2d01ddeb1f2f@postgresql.org>
References: <17300-dced2d01ddeb1f2f@postgresql.org>

PG Bug reporting form <noreply@postgresql.org> writes:
> The following query:

> select ('[\"\\\\\",\"\\\\' || repeat('a', 200) ||
> '\"]')::textrange::textmultirange

> leads to the server crash with the following stacktrace:

I think the problem here is that the range bound values inside the
multirange are supposed to be aligned (at least, write_multirange_data
thinks so) but multirange_get_range isn't accounting for the alignment
padding between the two values it extracts.  In this example that
causes it to extract an insane length for the second value.

If so, this would indicate extremely slipshod testing of the multirange
stuff, because the breakage is necessarily reached by multirange_out.

			regards, tom lane





view thread (5+ messages)  latest in thread

Message-ID: <2001128.1638398395@sss.pgh.pa.us>
Permalink:  ../2001128.1638398395@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2001128.1638398395@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, aekorotkov@gmail.com, pj@illuminatedcomputing.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17300: Server crashes on deserializing text multirange
  In-Reply-To: <2001128.1638398395@sss.pgh.pa.us>

* 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