Executing a Canon Basic script can cause memory corruption and camera crash when CHDK is loaded.
Ports that use the memory area named "AdditionAgentRAM" (short: ARAM).
To find out whether a particular port is affected, see whether OPT_ARAM_MALLOC is defined in the port's makefile.inc file (platform/camera/makefile.inc or platform/camera/sub/xxx/makefile.inc).
Alternatively, use the "Module Inspector" utility in the CHDK menu: Miscellaneous stuff -> Modules -> Module Inspector, and look for a line starting with "ARAM:".
original post follows
This "unused piece of memory" caused me a bit of a nasty surprise*. While trying to find out why the new port I'm working on dies with various signs of memory corruption, I accidentally found out that Canon Basic does use the AdditionAgent area.
On this particular model (D6, r57), ARAM between +0x10000 and +0x1ef8f is erased and apparently used by CBasic.
It could be that earlier camera generations are also affected...
*Of course, I was loading the CHDK core to ARAM and wanted to run a memory dumper CBasic script. Camera was stable until I pressed SET to run the script. Took me several days to recognize...
post restructured to provide better explanation for readers redirected from wikia