Mail Archives: djgpp/1996/08/03/00:30:38
Reply to message 2941876 from CONRADSONG AT MA on 07/28/96 10:26PM
>Just so everyone's aware. There are quirks in which different libraries
>treat malloc and realloc routines.
Oh no. Quirks in individual compilers' libraries? Do tell! ;)
>Borland returns a NULL pointer on a malloc( (size_t)(0) );
>Microsoft does not deallocate the passed memory block on a failed realloc.
>
>Perhaps someone can come up with a way to neatly fix the problem?
Well, I suppose you could somehow obtain the source code for these
compilers, debug it, and submit patched versions to the respective
companies. Of course, there's no way they'd release the source
code, so that's out.
You could disassemble their library object code, fix it, and submit
patches, but then they'd sue you for breach of license, copyright,
and everything else.
You could spend years becoming a programmer for these
companies and work your way up to the point where you'd be
in charge of the newest revisions of their products, and use
your influence to get the problem fixed. Of course, you'd
probably be told it isn't cost-effective or necessary, and you
wouldn't get approval. Not to mention that this would only work
with one company; trying to switch to another to do the same
thing would probably get you indicted for corporate espionage
or something.
Or you could convince every programmer in the world to
switch to DJGPP, which actually encourages you to find and
fix bugs and submit additional material. Well, we can dream... :(
John
- Raw text -