pgsql: Fix pg_tzset() to ensure that 'lclmem' (the static variable - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix pg_tzset() to ensure that 'lclmem' (the static variable
Date
Msg-id 20060110201625.6D0BD9DC8D9@postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Fix pg_tzset() to ensure that 'lclmem' (the static variable holding
the localtime timezone data) is not overwritten until we know the data
is good.  tzload() is capable of failing after having begun modifying
the struct it's pointed at, and in such cases the static data was left
in a corrupt state.  Bug does not exist pre-8.0 (since we didn't have
this code then) nor post-8.0 (since we already changed the code to
tzload into local variables initially).  Per report from Nick Martens.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/timezone:
        localtime.c (r1.9 -> r1.9.4.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/timezone/localtime.c.diff?r1=1.9&r2=1.9.4.1)

pgsql-committers by date:

Previous
From: neilc@postgresql.org (Neil Conway)
Date:
Subject: pgsql: Minor code clarity improvement: AFAICS, estate.eval_econtext must
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Improve error messages for missing-FROM-entry cases, as per