pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix exception safety bug in typcache.c.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix exception safety bug in typcache.c.
@ 2023-09-13 03:09  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2023-09-13 03:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix exception safety bug in typcache.c.

If an out-of-memory error was thrown at an unfortunate time,
ensure_record_cache_typmod_slot_exists() could leak memory and leave
behind a global state that produced an infinite loop on the next call.

Fix by merging RecordCacheArray and RecordIdentifierArray into a single
array.  With only one allocation or re-allocation, there is no
intermediate state.

Back-patch to all supported releases.

Reported-by: "James Pang (chaolpan)" <chaolpan@cisco.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/PH0PR11MB519113E738814BDDA702EDADD6EFA%40PH0PR11MB5191.namprd11.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3acd0599bd8e18ae831d1cc86b687453fdbd424a

Modified Files
--------------
src/backend/utils/cache/typcache.c | 48 +++++++++++++++++++++-----------------
src/tools/pgindent/typedefs.list   |  1 +
2 files changed, 28 insertions(+), 21 deletions(-)



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

* pgsql: Fix exception safety bug in typcache.c.
@ 2023-09-13 03:09  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2023-09-13 03:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix exception safety bug in typcache.c.

If an out-of-memory error was thrown at an unfortunate time,
ensure_record_cache_typmod_slot_exists() could leak memory and leave
behind a global state that produced an infinite loop on the next call.

Fix by merging RecordCacheArray and RecordIdentifierArray into a single
array.  With only one allocation or re-allocation, there is no
intermediate state.

Back-patch to all supported releases.

Reported-by: "James Pang (chaolpan)" <chaolpan@cisco.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/PH0PR11MB519113E738814BDDA702EDADD6EFA%40PH0PR11MB5191.namprd11.prod.outlook.com

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f899c7f1eae43a95ae5d221e754283d8fcfe8bc1

Modified Files
--------------
src/backend/utils/cache/typcache.c | 48 +++++++++++++++++++++-----------------
src/tools/pgindent/typedefs.list   |  1 +
2 files changed, 28 insertions(+), 21 deletions(-)



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

* pgsql: Fix exception safety bug in typcache.c.
@ 2023-09-13 03:09  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2023-09-13 03:09 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix exception safety bug in typcache.c.

If an out-of-memory error was thrown at an unfortunate time,
ensure_record_cache_typmod_slot_exists() could leak memory and leave
behind a global state that produced an infinite loop on the next call.

Fix by merging RecordCacheArray and RecordIdentifierArray into a single
array.  With only one allocation or re-allocation, there is no
intermediate state.

Back-patch to all supported releases.

Reported-by: "James Pang (chaolpan)" <chaolpan@cisco.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/PH0PR11MB519113E738814BDDA702EDADD6EFA%40PH0PR11MB5191.namprd11.prod.outlook.com

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a26cc0334f8b02c949b68d6ba9061eeb1fa75498

Modified Files
--------------
src/backend/utils/cache/typcache.c | 52 +++++++++++++++++++-------------------
src/tools/pgindent/typedefs.list   |  1 +
2 files changed, 27 insertions(+), 26 deletions(-)



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

* pgsql: Fix exception safety bug in typcache.c.
@ 2023-09-13 03:10  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2023-09-13 03:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix exception safety bug in typcache.c.

If an out-of-memory error was thrown at an unfortunate time,
ensure_record_cache_typmod_slot_exists() could leak memory and leave
behind a global state that produced an infinite loop on the next call.

Fix by merging RecordCacheArray and RecordIdentifierArray into a single
array.  With only one allocation or re-allocation, there is no
intermediate state.

Back-patch to all supported releases.

Reported-by: "James Pang (chaolpan)" <chaolpan@cisco.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/PH0PR11MB519113E738814BDDA702EDADD6EFA%40PH0PR11MB5191.namprd11.prod.outlook.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e2452c2a630a6952289816d9b241d227a38cb93d

Modified Files
--------------
src/backend/utils/cache/typcache.c | 52 +++++++++++++++++++-------------------
src/tools/pgindent/typedefs.list   |  1 +
2 files changed, 27 insertions(+), 26 deletions(-)



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

* pgsql: Fix exception safety bug in typcache.c.
@ 2023-09-13 03:10  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2023-09-13 03:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix exception safety bug in typcache.c.

If an out-of-memory error was thrown at an unfortunate time,
ensure_record_cache_typmod_slot_exists() could leak memory and leave
behind a global state that produced an infinite loop on the next call.

Fix by merging RecordCacheArray and RecordIdentifierArray into a single
array.  With only one allocation or re-allocation, there is no
intermediate state.

Back-patch to all supported releases.

Reported-by: "James Pang (chaolpan)" <chaolpan@cisco.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/PH0PR11MB519113E738814BDDA702EDADD6EFA%40PH0PR11MB5191.namprd11.prod.outlook.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/189097db822de17dc1a501fe57f4db5fdd739e18

Modified Files
--------------
src/backend/utils/cache/typcache.c | 52 +++++++++++++++++++-------------------
src/tools/pgindent/typedefs.list   |  1 +
2 files changed, 27 insertions(+), 26 deletions(-)



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

* pgsql: Fix exception safety bug in typcache.c.
@ 2023-09-13 03:10  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2023-09-13 03:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix exception safety bug in typcache.c.

If an out-of-memory error was thrown at an unfortunate time,
ensure_record_cache_typmod_slot_exists() could leak memory and leave
behind a global state that produced an infinite loop on the next call.

Fix by merging RecordCacheArray and RecordIdentifierArray into a single
array.  With only one allocation or re-allocation, there is no
intermediate state.

Back-patch to all supported releases.

Reported-by: "James Pang (chaolpan)" <chaolpan@cisco.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/PH0PR11MB519113E738814BDDA702EDADD6EFA%40PH0PR11MB5191.namprd11.prod.outlook.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/012b80ad20c2f8459d4cbe083e3f0323050d275b

Modified Files
--------------
src/backend/utils/cache/typcache.c | 52 +++++++++++++++++++-------------------
src/tools/pgindent/typedefs.list   |  1 +
2 files changed, 27 insertions(+), 26 deletions(-)



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

* pgsql: Fix exception safety bug in typcache.c.
@ 2023-09-13 03:10  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2023-09-13 03:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix exception safety bug in typcache.c.

If an out-of-memory error was thrown at an unfortunate time,
ensure_record_cache_typmod_slot_exists() could leak memory and leave
behind a global state that produced an infinite loop on the next call.

Fix by merging RecordCacheArray and RecordIdentifierArray into a single
array.  With only one allocation or re-allocation, there is no
intermediate state.

Back-patch to all supported releases.

Reported-by: "James Pang (chaolpan)" <chaolpan@cisco.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/PH0PR11MB519113E738814BDDA702EDADD6EFA%40PH0PR11MB5191.namprd11.prod.outlook.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6ae57f190e276f46bc2d0b616515bed4b4f664ce

Modified Files
--------------
src/backend/utils/cache/typcache.c | 52 +++++++++++++++++++-------------------
src/tools/pgindent/typedefs.list   |  1 +
2 files changed, 27 insertions(+), 26 deletions(-)



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


end of thread, other threads:[~2023-09-13 03:10 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-09-13 03:09 pgsql: Fix exception safety bug in typcache.c. Thomas Munro <tmunro@postgresql.org>
2023-09-13 03:09 pgsql: Fix exception safety bug in typcache.c. Thomas Munro <tmunro@postgresql.org>
2023-09-13 03:09 pgsql: Fix exception safety bug in typcache.c. Thomas Munro <tmunro@postgresql.org>
2023-09-13 03:10 pgsql: Fix exception safety bug in typcache.c. Thomas Munro <tmunro@postgresql.org>
2023-09-13 03:10 pgsql: Fix exception safety bug in typcache.c. Thomas Munro <tmunro@postgresql.org>
2023-09-13 03:10 pgsql: Fix exception safety bug in typcache.c. Thomas Munro <tmunro@postgresql.org>
2023-09-13 03:10 pgsql: Fix exception safety bug in typcache.c. Thomas Munro <tmunro@postgresql.org>

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