Fix possible crash at transaction end when a plpgsql function is used and
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 2 Mar 2006 05:34:17 +0000 (05:34 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 2 Mar 2006 05:34:17 +0000 (05:34 +0000)
commitb3c47b1e5e6427ba64ee0feed658057d2077b17d
tree6c6d7d3e9006c57a769086141a5c0883ebbf300e
parent15516c5f0b8c8209e23f36aa6e204e21bea19e6c
Fix possible crash at transaction end when a plpgsql function is used and
then modified within the same transaction.  The code was using a linked list
of active PLpgSQL_expr structs, which was OK when it was written because
plpgsql never released any parse data structures for the life of the backend.
But since Neil fixed plpgsql's memory management, elements of the linked list
could be freed, leading to crash when the list is chased.  Per report and test
case from Kris Jurka.
src/pl/plpgsql/src/pl_exec.c
src/pl/plpgsql/src/plpgsql.h