Re: [Mingw-w64-public] [PATCH] Fix bug in __stosb

2013-05-19 Thread Rafaël Carré
Le 19/05/2013 08:55, Václav Zeman a écrit : On 19 May 2013 05:17, dw limegreenso...@yahoo.com wrote: There is a bug in __stosb (as well as the other __stos* functions), as illustrated by this code (compile with -Os for 64bit): #include stdio.h #include windows.h #ifndef _AMD64_ #error

Re: [Mingw-w64-public] [PATCH] Fix bug in __stosb

2013-05-19 Thread dw
memory clobber is missing (I agree that this is not obvious!) Sorry, it's my first 'patch' post and I wasn't sure what was appropriate to include. Didn't want the thing to be too cluttered. There are actually 4 things changed: 1) The memory clobber. This is the key change. There is an

Re: [Mingw-w64-public] [PATCH] Fix bug in __stosb

2013-05-19 Thread Kai Tietz
thanks for the patch. please apply. Kai Am 19.05.2013 21:44 schrieb dw limegreenso...@yahoo.com: memory clobber is missing (I agree that this is not obvious!) Sorry, it's my first 'patch' post and I wasn't sure what was appropriate to include. Didn't want the thing to be too cluttered.

Re: [Mingw-w64-public] [PATCH] Fix bug in __stosb

2013-05-19 Thread Rafaël Carré
Le 19/05/2013 21:53, Kai Tietz a écrit : thanks for the patch. please apply. Kai Am 19.05.2013 21:44 schrieb dw limegreenso...@yahoo.com: Committed as r5867 -- AlienVault Unified Security Management (USM) platform

[Mingw-w64-public] [PATCH] Fix bug in InterlockedOr

2013-05-19 Thread dw
There is a bug in the InterlockedOr function (as well as InterlockedAnd, InterlockedXor, InterlockedOr64, InterlockedAnd64, InterlockedXor64) where they do not return the old value as expected, but instead return (sort of) the new value. This code illustrates the problem: #include stdio.h