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

From tgl@svr1.postgresql.org (Tom Lane)
Subject pgsql: MemSet() must not cast its pointer argument to int32* until after
Date
Msg-id 20050718155412.0BD1552A0F@svr1.postgresql.org
Whole thread Raw
List 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_4_STABLE

Modified Files:
--------------
    pgsql/src/include:
        c.h (r1.156 -> r1.156.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/c.h.diff?r1=1.156&r2=1.156.2.1)

pgsql-committers by date:

Previous
From: tgl@svr1.postgresql.org (Tom Lane)
Date:
Subject: pgsql: MemSet() must not cast its pointer argument to int32* until after
Next
From: tgl@svr1.postgresql.org (Tom Lane)
Date:
Subject: pgsql: MemSet() must not cast its pointer argument to int32* until after