Re: [cc65] calloc() not failing

From: Kajtár Zsolt <>
Date: 2012-11-13 07:40:01
Hash: SHA1

> How can that work? Initialized data is no longer initialized correctly if
> the program runs the second time. That may or may not cause trouble.
> Making the program unrunable needs code and I don't see a reason to place
> this penalty on all programs. If you prefer not to be able to run your
> program again, you may choose to terminate your program by jumping to the
> coldstart vector or whatever. This is what most games do.

?! This sounds like a bug, even if the solution involves wasting the same
amount of memory as the initialized data section. And even more memory is
wasted when someone tries to work this around by initializing variables
explicitly by code.

It should be possible to merge the initializing data with the initialized
variable section to save space as an option for those who know what they do,
but otherwise people are shooting themselves in the foot right now.

Anyway it's just my personal opinion.

- -- 
Version: GnuPG v1.4.12 (GNU/Linux)

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Nov 13 07:40:34 2012

This archive was generated by hypermail 2.1.8 : 2012-11-13 07:40:38 CET