Re: [cc65] Bug in malloc()

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 1999-10-20 08:14:46


> I am using the pc version at the moment. I guess I need to move
> over to the linux box to get this latest patch. Unless there is a quick
> fix for the pc version. Do you cross compile the pc version on linux,
> or do you use a native pc compiler? Just curious.

Since malloc is one of the library files there is fortunately no need for a
new compiler. The object and library files created on Linux or one of the
other versions are binary compatible, so I'm creating the libraries under
Linux and just copy them into the other archives.

If you are using malloc(), a simple solution is to move a copy of malloc.c
(from lib/common/) into your project directory, apply the fix (which is just
one line and can be easily done by hand) and compile the resulting file with
your project. cl65 will use the files from left to right, so if the linkers'
request for a symbol named _malloc has already been satisfied your fixed
module, it won't retrieve the buggy one from the library.			

If your programs don't use malloc, don't care about the bug.

Apart from that it's of course a good idea to move to Linux:-)

Regards


	Uz


--
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:45 CET