]> 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:53:46 +0000 (15:53 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Jul 2005 15:53:46 +0000 (15:53 +0000)
commit183b1bf84f127f420451f9eb0bc74c86af238cfa
tree7e8744eaad9ad879d4f6fbbb14ec42fa04511aaa
parentf6cb7198edd278067c11560b01c0421c1a616466
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