gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Corrupted heap


From: Richard Frith-Macdonald
Subject: Re: Corrupted heap
Date: Fri, 19 Mar 2010 09:31:10 +0000

On 18 Mar 2010, at 13:27, Vincent Richomme wrote:


> And apply the patch I have provided a few days ago to fix some cast issues
> and wrong data type(unsigned replaced by socklen_t) on msys/mingw{-w64}?

Unless I've missed a patch, I think this was already applied, but then you 
supplied a new version of the patch (which won't apply because the first one 
has already been applied).

Looking at the actual content of the second version of the patch, I think this 
version shouldn't be applied anyway:

It casts the buffer arguments of send() and recv() to be const char* and char* 
instead of the const void* and void* that they are now.

The current types are correct (for unix and linux and mingw32 and posix and 
xopen). 
It looks like microsoft chose to use incorrect types when they copied the unix 
apis for winsock, and I guess mingw32 chose to use the original/correct types, 
but presumably mingw64 uses the microsoft specific version (was this an 
accident/mistake or an intentional decision?
So it seems to be there are two possibilities for this:
1. contact the mingw64 people and ask them to fix their headers to use the 
correct types 
or
2. produce a patch to cast the types if (and only if) building on mingw64

It may be that the mingw64 people have consciously chosen to use the wrong 
types, for microsoft compatibility, but this seems perverse as the point of the 
mingw project is surely to let people outside the microsoft world write stuff 
to run on windows, so using the correct types would make much more sense.  
However, they may have reasons for using the wrong types in the headers, in 
which case asking them to use the right ones will probably not help.  On the 
other hand, this may simply have crept in as a bug which they would be happy to 
fix.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]