Re: [hatari-devel] asm56000.ttp problem |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
On Mittwoch, 3. Oktober 2018 13:47:25 CEST Christian Zietz wrote:
> That explains why programs using current mintlib are not crashing with
> Harari's GEMDOS HD.
Yes, but that still means that functions like isatty() (which look at that
array) will not correctly work with GEMDOS handles >= 40. But that's another
issue.
>And this is precisely what appens within the open() call in asm56000:
>Given a file handle>=40 it will write past the end of __open_stat, as I
>have verified with the Hatari debugger.
Yes, there is an assert in that function, but if the library was compiled with
NDEBUG it will just continue. Current mintlib seems to be safe in that regard.
And if you look at _write: that function rejects handles >= __NHANDLES. That
explains why the file is created, but nothing written to it. So my previous
assumption was wrong: the bug is in the library.