pgsql: MemSet() must not cast its pointer argument to int32* until after

From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: MemSet() must not cast its pointer argument to int32* until after
Date: 2005-07-18 15:55:01
Message-ID: 20050718155501.9D5D952A71@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
MemSet() must not cast its pointer argument to int32* until after it has
checked that the pointer is actually word-aligned. Casting a non-aligned
pointer to int32* is technically illegal per the C spec, and some recent
versions of gcc actually generate bad code for the memset() when given
such a pointer. Per report from Andrew Morrow.

Tags:
----
REL7_2_STABLE

Modified Files:
--------------
pgsql/src/include:
c.h (r1.114 -> r1.114.2.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/c.h.diff?r1=1.114&r2=1.114.2.1)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2005-07-18 16:35:07 pgsql: Fix C++-style comments, per Rocco Altier.
Previous Message Tom Lane 2005-07-18 15:54:30 pgsql: MemSet() must not cast its pointer argument to int32* until after