]> 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:55:01 +0000 (15:55 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 18 Jul 2005 15:55:01 +0000 (15:55 +0000)
commita55a75f02dd83761d201030e11277ebbba27a1bc
tree705d90ea5a4a25ab857344af4a91e99e3c713f6e
parent84e5ce7eb9c193586cca94a3de771c3188fd708e
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