]> 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:28 +0000 (15:53 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Jul 2005 15:53:28 +0000 (15:53 +0000)
commitac43da8466971553001e7105e03d514b72721814
tree7c1a76ad7ae65c5cac1265a3c903e4046504e050
parentd0f312ebfe09692f7d213da6c7c6277b438d3d10
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