Known Bugs

Version 2.12.0

Component
Description
Compiler
Date: 2009-01-12
Problem: Some compiler generated code containing endless loops will cause the optimizer to also enter an endless loop.
Workaround: None
Fix: Download and apply the patch, then recompile the compiler.
Bug found by: <ogd at gmx-topmail. de>
Compiler
Date: 2008-12-28
Problem: When casting expressions that contains symbols down to smaller sizes (chars), the higher bits won't get cleared.
Workaround: Use & 0xFF.
Fix: Download and apply the patch, then recompile the compiler.
Bug found by: Groepaz <groepaz at gmx. net>

Version 2.10.1

Component
Description
ca65html utility
Date: 2005-07-31
Problem: The ca65html utility doesn't handle the .word and .addr assembler commands correctly, if the operands contain an expression and not just a label.
Workaround: None.
Fix: Download the patch and apply it to the ca65html perl script.
Bug found by: Spiro Trikaliotis <ml-cc65 at trikaliotis. net>
Library
Date: 2005-07-05
Problem: The subroutine that does divisions for longs overwrites the high byte of the divisor instead of the high byte of the result. This leads to errorneous results if the high byte of the divisor is not zero.
Workaround: None.
Fix: Download and apply the patch, then recompile the library. You may alternatively assemble the patched module and link it to your application. If the module name preceeds the library on the command line, the new module will be used instead that from the library.
Bug found by: <priit at tefs. ee>
Disassembler
Date: 2005-06-30
Problem: If the last range in the binary file is explicitly marked as "Code", and the operand byte(s) of the last opcode are not part of the ROM, the disassembler will abort with an internal error. This does usually happen if the specification as "Code" is wrong and should probably be some sort of data table.
Workaround: Leave the last few bytes unmarked, or mark it as some sort of data table.
Fix: Download and apply the patch, then recompile the disassembler.
Bug found by: Keith Howell
Compiler
Date: 2005-06-08
Problem: Compiling an empty source file leads to an internal compiler error:
	cc65: Check failed: LI != 0, file `lineinfo.c', line 125
	
Workaround: Create some content for your source files:-)
Fix: Download and apply the patch, then recompile the compiler.
Assembler
Date: 2005-05-29
Problem: The assembler doesn't allow empty or comment lines within a .struct or .union declaration.
Workaround: None.
Fix: Download and apply the patch, then recompile the assembler.
Bug found by: Wolfgang Moser <w. moser at gm. fh-koeln. de>
co65 utility
Date: 2005-04-02
Problem: The co65 program fails to convert symbols that depend on imports correctly.
Workaround: None.
Fix: Is fixed in the development version.
Bug found by: Spiro Trikaliotis <ml-cc65 at trikaliotis. net>
Assembler
Date: 2005-04-02
Problem: The assembler does not allow a unary plus in expressions.
Workaround: Remove the unary plus.
Fix: Download and apply the patch, then recompile the assembler.
Bug found by: Spiro Trikaliotis <ml-cc65 at trikaliotis. net>
Compiler
Date: 2005-03-11
Problem: When testing a local variable of type long or unsigned long, the compiler just loads the variable and omits the test.
Workaround: Use an explicit compare:
        long l;
        while (l) { ... }       /* Will NOT work */
        while (l != 0) { ... }  /* Will work */
	
Fix: Download and apply the patch, then recompile the library.
Bug found by: Carlos Sánchez de La Lama <csanchez at sidsa. es>
Library
Date: 2005-02-14
Problem: The vfprintf function contained another problem that was not fixed by patch #16 (2005-02-08). The function did not handle file errors correctly. As with the last problem, this is also true for all functions calling vfprintf, namely printf, fprintf and vprintf.
Note: Be sure to apply the patch after #16.
Workaround: None.
Fix: Download and apply the patch, then recompile the library.
Bug found by: Greg King <gngking at erols. com>
Library
Date: 2005-02-08
Problem: The vfprintf function contains an error that prevents it from returning the correct result. A more or less random number is returned instead of the number of output bytes. Since printf, fprintf and vprintf call vfprintf for output, these functions do also return invalid values.
Workaround: None.
Fix: Download and apply the patch, then recompile the library.
Bug found by: Oliver Schmidt <ol. sc at web. de>
Linker
Date: 2005-01-14
Problem: The linker does not update the size of an internal buffer used to store relocation entries when generating o65 output files. Relocation table grow beyond 4096 bytes will cause memory corruption. Core dumps or similar things are possible.
Note: The erroneous function is triggered only when larger relocatable o65 files are generated. Most platforms use binary output files and are therefore not affected.
Workaround: None.
Fix: Download and apply the patch, then recompile the linker.
Bug found by: Greg King <gngking at erols. com>
Library
Date: 2004-11-30
Problem: The _swap library function does not work correctly for blocks greater than 256 bytes.
Workaround: None.
Fix: Download and apply the patch, then recompile the library.
Bug found by: Oliver Schmidt <ol. sc at web. de>
Disassembler
Date: 2004-10-26
Problem: The disassembler doesn't handle the "absolute X indirect" mode that is available with the 65SC02 and 65C02 CPUs. It bails out with
	Error: Not implemented
	
Workaround: None.
Fix: Download and apply the patch, then recompile the disassembler.
Bug found by: Miroslav Zinaić <mzinaic at globalnet. hr>
co65 utility
Date: 2004-10-10
Problem: The utility does not work correctly, aborting with
       	co65: Internal error: Invalid size field value in o65 header
	
Workaround: None.
Fix: Download and apply the patch, then recompile the utility.
Bug found by: Karri Kaksonen <karri at sipo. fi>
Compile&Link utility
Date: 2004-10-10
Problem: The --forget-inc-paths option does not work correctly.
Workaround: Call the compiler directly, not through cl65.
Fix: Download and apply the patch, then recompile the utility.
Bug found by: Christian Groessler <cpg at aladdin. de>
Compiler
Date: 2004-09-22
Problem: The compiler generates wrong code for a switch statement without labels.
Workaround: Remove the switch statement.
Fix: Download and apply the patch, then recompile the compiler.
Bug found by: Stefan A. Haubenthal <polluks at web. de>
CBM Libraries
Date: 2004-08-09
Problem: Closing all open files on program exit did not work correctly.
Workaround: Close all files before terminating the program.
Fix: Download and apply the patch, then recompile the library.
Bug found by: Stefan A. Haubenthal <polluks at web. de>
Compiler
Date: 2004-08-02
Problem: Functions are not converted to pointers when passed as parameters to a function without a prototype or in the variadic part of an argument list. A prominent example where this happens is printf:
	    #include <stdio.h>
	    int main (void)
	    {
	        printf ("The address of main is %p\n", main);
		return 0;
	    }
        
Workaround: Use the "address of" operator (&).
Fix: Download and apply the patch, then recompile the compiler.
Bug found by: Christian Groessler <cpg at aladdin. de>
Compiler
Date: 2004-07-18
Problem: Inline assembler instructions that have accumulator addressing mode when used without an argument (lsr, ...), may cause strange optimizer behavior when used without the "a" argument that denotes accumulator addressing.
Workaround: Always use the (otherwise optional) "a" argument that denotes accumulator addressing with these instructions. Disabling the optimizer will also work around the problem.
Fix: Download and apply the patch, then recompile the compiler.
Bug found by: Glenn Jones <glenn. jones at rogers. com>
Compiler
Date: 2004-07-15
Problem: The compiler generates bad code for pointer arithmetic were one of the operands is a string literal. Example:
	    puts ("xxxxxxxxxxxxxxxxxxxx" + 10);
        
Workaround: Use a char array instead of a string literal.
Fix: Download and apply the patch, then recompile the compiler.
Bug found by: MagerValp <MagerValp at cling. gu. se>
Assembler docs
Date: 2004-06-30
Problem: The example given for the .REPEAT command is wrong. Instead of the .XOR operator, ^ has to be used.
Workaround: None.
Fix: Use ^ instead of .XOR.
Bug found by: Stefan A. Haubenthal <polluks at web. de>
Compiler
Date: 2004-06-10
Problem: Compiled binaries do not work on 64 bit systems that use the LP64 model. See bug report from 2004-05-06 below.
Workaround: Use a 32 bit machine or compile the compiler as 32 bit program.
Fix: Download and apply the patch, then recompile the compiler.
Bug found by: Joachim Strömbergson <Joachim. Strombergson at InformAsic. com>
Thanks to: MagerValp, for giving me a temporary account on a 64 bit machine, so I could locate and fix the problem.
Compiler
Date: 2004-06-05
Problem: Data declared as volatile is not always parsed correctly.
Workaround: None.
Fix: Download and apply the patch, then recompile the compiler.
Linker
Date: 2004-06-02
Problem: The __XXX_LAST__ symbol created by the linker for a memory area is not the first address not used by data, as documented, but the number of bytes allocated in this memory area.
Workaround: Use __XXX_START__+__XXX_LAST__ instead, eventually with an additional check of .VERSION.
Fix: Download and apply the patch, then recompile the linker.
Bug found by: Oliver Schmidt <ol. sc at web. de>
Compiler
Date: 2004-05-28
Problem: The compiler accepts types that are not ints or pointers on the left side of op= operators. Example:
	    struct {
		char a, b;
	    } x;
	    x += 3;
        
Workaround: Don't do it:-)
Fix: Will get fixed in the development version.
Compiler
Date: 2004-05-27
Problem: The compiler allows values that aren't (constant numeric) integers in several places without emitting a diagnostic. Example:
	    int i;
	    int a[];
	    char* p;
	    enum foo {
	    	bar = (int) &a;
	    };
	    char x[(int)&(a+1)];
	    i = a[p];
	    p = -p;
	    p = +p;
	    p = ~p;
        
Workaround: Don't do it:-)
Fix: Will get fixed in the development version.
Compiler
Date: 2004-05-23
Problem: The compiler doesn't accept an array as left hand side for the -> operator. Example:
	    struct foo {
		unsigned char a, b;
	    } bar[2];
	    ...
	    bar->a = 0;
        
Workaround: Use array/dot syntax.
Fix: Download and apply the patch, then rebuild the compiler.
C library
Date: 2004-05-12
Problem: The _scanf function, on which all other scanf functions are based, doesn't parse negative integers correctly.
Workaround: None.
Fix: Download and apply the patch, then rebuild the library.

Version 2.10.0

Component
Description
All(?)
Date: 2004-05-06
Problem: Compiled binaries do currently not work on (some?) 64 bit systems. This has worked for older versions, but is not checked regularly, and it was reported by the FreeBSD port system maintainer that the compiler is not able to translate its own libraries on 64 bit platforms.
Workaround: Use a 32 bit machine:-)
Fix: I don't have access to such a machine, and the FreeBSD people couldn't tell me anything about the platform where the compiler fails (besides being "64 bit"). So there is no fix, and as long as I don't have more information about the problem there ain't one.
Bug found by: Joachim Strömbergson <Joachim. Strombergson at InformAsic. com>
GEOS Library
Date: 2004-05-06
Problem: The joy_stddrv variable, which contains the name of the standard joystick driver for a platform is missing in the GEOS library.
Workaround: Define
        const char joy_stddrv[] = "geos-stdjoy.joy";
        
somewhere in your sources.
Fix: Assemble and add the joy_stddrv.s, module to the GEOS library.
Bug found by: Stefan A. Haubenthal <polluks at web. de>
Compiler
Date: 2004-05-02
Problem: When parsing type declarations, the compiler doesn't do bounds checking. As a result, it may crash on input files containing an excessive number of type declarators (sometimes the result of a typo in the input file).
Workaround: Fix your code.
Fix: Download and apply the patch, then rebuild the compiler.
Bug found by: Glenn Jones <apple2stuff at rogers. com>
Assembler
Date: 2004-04-19
Problem: Under the following conditions, the assembler generates output files with illegal address sizes that lead to an error when passed to the linker:
  • A symbol is first marked as global.
  • The symbol is defined later.
  • The definition contains a forward reference to another symbol.
Example:
		.global	foo
		foo =	bar+1
	bar:	lda	#$00
	
Workaround: Change the code and remove at least one of the preconditions that trigger the error.
Fix: Download and apply the patch, then rebuild the assembler.
Docs
Date: 2004-04-08
Problem: Between version 2.9 and 2.10, the syntax for the .segment directive has changed. Older versions used a comma between the name of the segment and an optional attribute, while the new version uses a colon. The decision for this (incompatible) change was based on the fact that attributes are used very rarely with segments. However, when doing the change, the documentation was not updated accordingly, so it still says a comma is needed. Unfortunately the error message is not very clear. This is what you get:
	Unexpected trailing garbage characters
	
Workaround: Don't believe the docs:-)
Fix: Use a colon instead of a comma.
Bug found by: MagerValp <MagerValp at cling. gu. se>
Library
Date: 2004-04-08
Problem: The joystick driver framework is missing an .export statement for the joy_unload function. This means that the function is not seen by the linker and cannot be called from user code.
Workaround: None.
Fix: Download and apply the patch, then rebuild the library.
Bug found by: Stefan A. Haubenthal <polluks at web. de>
C128 TGI drivers
Date: 2004-04-04
Problem: The two VDC TGI drivers for the C128 contain an error in the line routine.
Workaround: None.
Fix: Download and apply the patch, then reassemble the drivers.
Bug found by: Greg King <gngking at erols. com>
Assembler
Date: 2004-03-20
Problem: A forward reference to an unnamed label that is undefined causes an internal assembler error.
Workaround: Fix your code.
Fix: Is fixed in the development version.
Bug found by: MagerValp <MagerValp at cling. gu. se>
Assembler
Date: 2004-03-20
Problem: The assembler doesn't check for end of line after a conditional assembly command (.IF/.ELSE/...), and will accept invalid input without an error message. This is especially confusing for an .IF combined with an expression:
       	    .if $01 != $00
	
In the example above, the != operator is illegal (there is no such operator). So parsing stops after the $01, the .IF expression evaluates to TRUE, and the remainder of the line is skipped. The assembler behaves as if the command had worked, which is not the case.
Workaround: None. Check your input.
Fix: Is fixed in the development version.
Bug found by: Carlos <carlosofcascade at gmx. net>
Compiler
Date: 2004-03-19
Problem: A function in the optimizer does not correct an index when walking over the code. As a result, instructions may be skipped, and the optimizer may miss some oportunities.
Workaround: None needed, the generated code is correct but may be larger/slower than it could be.
Fix: Download and apply the patch, then recompile the compiler.
Bug found by: Glenn Jones <apple2stuff at rogers. com>
Compiler
Date: 2004-03-19
Problem: An internal table used to store information about register usage of runtime function had one duplicate and one out of order entry. This may lead to failures when retrieving information about runtime functions, which in turn may cause the optimizer to miss some oportunities.
Workaround: None needed, the generated code is correct but may be larger/slower than it could be.
Fix: Download and apply the patch, then recompile the compiler.
Compiler
Problem: The volatile keyword is not accepted in type casts or as argument to the sizeof operator, if the type spec is starting with this keyword.
Example:
	    *(volatile unsigned*)0x5000 = 0x20;
	
Workaround: Reorder the type spec so that the volatile keyword is not the first token.
Fix: Download and apply the patch, then recompile the compiler.
Bug found by: Glenn Jones <apple2stuff at rogers. com>
Archiver
Problem: The archiver (ar65) uses the tmpfile function to create a temporary file when working with the library. The way, the Watcom runtime library creates the temporary file doesn't seem to be compatible with Windows XP (and maybe Windows 2000), which may result in an error message
	ar65: Error: Cannot create temporary file:
	No such file or directory
	
Workaround: Make sure, the directory c:\tmp exists and is writable for the current user.
Fix: This error won't be fixed because it's a problem with the Watcom runtime, not with the cc65 tools itself.
Bug found by: Francesco Sblendorio <sblendorio. f at libero. it>
GEOS Library
Problem: The DrawLine and DrawPoint functions did still not work correctly after the last fix in 2.9.1.
Workaround: None.
Fix: Download the replacement modules for drawline and drawpoint, assemble them and link them to your application, or replace the modules in the library by the new ones.
Bug found by: Francesco Sblendorio <sblendorio. f at libero. it>
Assembler
Problem: There are two different problems with the new .STRUCT command: The .RES storage allocator does not work at all within a .STRUCT, and the .TAG command does not allocate the correct number of bytes for the element.
Workaround: None.
Fix: Download and apply the patch, then recompile the assembler.
Bug found by: Greg King <gngking at erols. com>
Assembler
Problem: Identifiers starting with a dot (using --feature leading_dots_in_identifiers) cannot be used as the names for .define style macros. This is also true for identifiers consisting of just one character.
Workaround: None.
Fix: Is fixed in the development version.
Bug found by: Stefan A. Haubenthal <polluks at web. de>
Disassembler
Problem: The disassembler outputs .text instead of .byte for a region marked as "texttable" in the info file.
Workaround: Don't use "texttable".
Fix: Download and apply the patch and recompile the disassembler.
Bug found by: Keith Gerdes <kwg at softhome. net>
Compile&link utility
Problem: The "none" target is not passed to the linker.
Workaround: Use a separate call to the linker.
Fix: Download and apply the patch and recompile the cl65 utility.
Bug found by: Keith Gerdes <kwg at softhome. net>
Assembler
Problem: A change to all of the builtin functions was not always done correctly. This may lead to crashes. The only function that does always crash the assembler is .blank, a few other functions may crash on invalid input.
Workaround: Instead of .if .blank use .ifblank.
Fix: Download and apply the patch and recompile the assembler.
Bug found by: Stephan Lesch <lesch at dfki. de>
Windows, DOS and OS/2 Binaries
Problem: ca65 is broken on these platforms, so it is not possible to create any output files. I have removed the binary packages for these platforms from the FTP server.
Workaround: Go back to 2.9.3 or use Linux.
Fix: Download and apply the patch and recompile the assembler.
Bug found by: Carlos <carlosofcascade at gmx. net>
Source makefile
Problem: The install target of the main makefile fail to create the necessary directories.
Workaround: None.
Fix: Download and apply the patch, then restart make.
CBM610 Library
Problem: The wherex and wherey functions do not work correctly.
Workaround: None.
Fix: Download and apply the patch, then recompile the library. You may also just translate the two changed functions and use
	    ar65 a cbm610.lib wherex.o wherey.o
	
to replace the object files in the library.

Valid HTML 4.01! Valid CSS! bugs.php; last change: 12-Jan-2009
Impressum