pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Avoid failure when selecting a namespace node in XMLTABLE.
4+ messages / 1 participants
[nested] [flat]

* pgsql: Avoid failure when selecting a namespace node in XMLTABLE.
@ 2019-10-25 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-10-25 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid failure when selecting a namespace node in XMLTABLE.

It appears that libxml2 doesn't bother to set the "children" field of
an XML_NAMESPACE_DECL node to null; that field just contains garbage.
In v10 and v11, this can result in a crash in XMLTABLE().  The rewrite
done in commit 251cf2e27 fixed this, somewhat accidentally, in v12.
We're not going to back-patch 251cf2e27, however.  The case apparently
doesn't have wide use, so rather than risk introducing other problems,
just add a safety check to throw an error.

Even though no bug manifests in v12/HEAD, add the relevant test case
there too, to prevent future regressions.

Chapman Flack (per private report)

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2bbdf8e2e827fe80fd39a4a5e2f432f4e8ae6ca3

Modified Files
--------------
src/test/regress/expected/xml.out   | 8 ++++++++
src/test/regress/expected/xml_1.out | 8 ++++++++
src/test/regress/expected/xml_2.out | 8 ++++++++
src/test/regress/sql/xml.sql        | 4 ++++
4 files changed, 28 insertions(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Avoid failure when selecting a namespace node in XMLTABLE.
@ 2019-10-25 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-10-25 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid failure when selecting a namespace node in XMLTABLE.

It appears that libxml2 doesn't bother to set the "children" field of
an XML_NAMESPACE_DECL node to null; that field just contains garbage.
In v10 and v11, this can result in a crash in XMLTABLE().  The rewrite
done in commit 251cf2e27 fixed this, somewhat accidentally, in v12.
We're not going to back-patch 251cf2e27, however.  The case apparently
doesn't have wide use, so rather than risk introducing other problems,
just add a safety check to throw an error.

Even though no bug manifests in v12/HEAD, add the relevant test case
there too, to prevent future regressions.

Chapman Flack (per private report)

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9bf24768664be6faf79333e1d4d6d14a0d33587b

Modified Files
--------------
src/backend/utils/adt/xml.c         | 7 ++++++-
src/test/regress/expected/xml.out   | 4 ++++
src/test/regress/expected/xml_1.out | 8 ++++++++
src/test/regress/expected/xml_2.out | 4 ++++
src/test/regress/sql/xml.sql        | 4 ++++
5 files changed, 26 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Avoid failure when selecting a namespace node in XMLTABLE.
@ 2019-10-25 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-10-25 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid failure when selecting a namespace node in XMLTABLE.

It appears that libxml2 doesn't bother to set the "children" field of
an XML_NAMESPACE_DECL node to null; that field just contains garbage.
In v10 and v11, this can result in a crash in XMLTABLE().  The rewrite
done in commit 251cf2e27 fixed this, somewhat accidentally, in v12.
We're not going to back-patch 251cf2e27, however.  The case apparently
doesn't have wide use, so rather than risk introducing other problems,
just add a safety check to throw an error.

Even though no bug manifests in v12/HEAD, add the relevant test case
there too, to prevent future regressions.

Chapman Flack (per private report)

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/592a16321bd760d21220d0b2648bf151065816a5

Modified Files
--------------
src/test/regress/expected/xml.out   | 8 ++++++++
src/test/regress/expected/xml_1.out | 8 ++++++++
src/test/regress/expected/xml_2.out | 8 ++++++++
src/test/regress/sql/xml.sql        | 4 ++++
4 files changed, 28 insertions(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Avoid failure when selecting a namespace node in XMLTABLE.
@ 2019-10-25 19:23  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-10-25 19:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Avoid failure when selecting a namespace node in XMLTABLE.

It appears that libxml2 doesn't bother to set the "children" field of
an XML_NAMESPACE_DECL node to null; that field just contains garbage.
In v10 and v11, this can result in a crash in XMLTABLE().  The rewrite
done in commit 251cf2e27 fixed this, somewhat accidentally, in v12.
We're not going to back-patch 251cf2e27, however.  The case apparently
doesn't have wide use, so rather than risk introducing other problems,
just add a safety check to throw an error.

Even though no bug manifests in v12/HEAD, add the relevant test case
there too, to prevent future regressions.

Chapman Flack (per private report)

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9f7a664fe35c40cc9b1a4ebec4fc990dc45370f3

Modified Files
--------------
src/backend/utils/adt/xml.c         | 7 ++++++-
src/test/regress/expected/xml.out   | 4 ++++
src/test/regress/expected/xml_1.out | 8 ++++++++
src/test/regress/expected/xml_2.out | 4 ++++
src/test/regress/sql/xml.sql        | 4 ++++
5 files changed, 26 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-10-25 19:23 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25 19:23 pgsql: Avoid failure when selecting a namespace node in XMLTABLE. Tom Lane <tgl@sss.pgh.pa.us>
2019-10-25 19:23 pgsql: Avoid failure when selecting a namespace node in XMLTABLE. Tom Lane <tgl@sss.pgh.pa.us>
2019-10-25 19:23 pgsql: Avoid failure when selecting a namespace node in XMLTABLE. Tom Lane <tgl@sss.pgh.pa.us>
2019-10-25 19:23 pgsql: Avoid failure when selecting a namespace node in XMLTABLE. Tom Lane <tgl@sss.pgh.pa.us>

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