[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] AHCC V4.11



On 30/05/2012 15:21, Henk Robbers wrote:
There is a new version available on my home page (see sig)

I found 2 bugs:

1) Project > Select
The filter includes "*.prj" in lower case. This confuses the TOS 1.62 and EmuTOS so we can't see the actual files. I have to type *.PRJ in uppercase to see the files. I saw this bug long ago, but this time I also tested on real TOS.

2) Tested on EmuTOS :
- Open HELLO_xx.PRJ
- HELLO_xx.PRJ > Make
- Crash inside EmuTOS

This is because something calls Fdatime() with an invalid handle (actually -33, potentially a File Not Found Fopen() result), then EmuTOS is not clever enough to detect that and dumbly crashes.

By looking at the AHCC sources I found a very good candidate:

shell\shell.c :

	if (*prj->files.op.s and (fh = Fopen(prj->files.op.s, 0)) ne 0 )
	{
		getstamp(&tp, fh, prj->files.op.s, 3);
		Fclose(fh);
	}

This can't work because Fopen() may return a negative error code, for example if the file does not exist. Then getstamp() will be called with an invalid handle, which is exactly what I encounter.

--
Vincent Rivière