]> granicus.if.org Git - postgresql/commit
MemSet() must not cast its pointer argument to int32* until after it has
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Jul 2005 15:54:11 +0000 (15:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Jul 2005 15:54:11 +0000 (15:54 +0000)
commitc76de7d85ecf7fc4034d42fc544d37f9d4aec7b6
treeca8d6c5bd1c0491c4b5b5e334b511751982e61d2
parent027b62384e389bd3bd6f70535b65d18851d1363d
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.
src/include/c.h