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

Started by Tom Lanealmost 21 years ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

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:
----
REL8_0_STABLE

Modified Files:
--------------
pgsql/src/include:
c.h (r1.178 -> r1.178.4.1)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/c.h.diff?r1=1.178&r2=1.178.4.1)