Ticket #201 (Fixed)Wed Apr 15 18:58:16 UTC 2009
Documentation change: size of error buffer
Reported by: | Ben Avison (25) | Severity: | Normal |
Part: | RISC OS: Documentation | Release: | |
Milestone: | Status | Fixed |
Details by Ben Avison (25):
A fix to be made to the documentation of error handlers once the PRMs are online…
Since always, the default ErrorV handler in the kernel has filled in the error buffer supplied by the installed error handler on the assumption that you can fit a 4-byte error address as well as a 256-byte error block into it – which requires a buffer of 260 bytes. However, the PRM documented the error buffer size to be 256 bytes.
While this could be fixed by making the kernel trim the last 4 bytes off the error message, this is undesirable because error messages are already too short for some purposes (particularly errors including full pathnames). All error handlers must be coded defensively in case they’re run on all the kernels that expect a 260-byte error buffer anyway, and so the fix is to update the documentation to warn authors of error handlers that they must allocate 260 bytes, not 256.
Changelog:
Modified by Sprow (202) Thu, January 31 2013 - 20:32:55 GMT
- Part changed from RISC OS: General to RISC OS: Documentation
Modified by Sprow (202) Thu, April 10 2014 - 21:37:41 GMT
- Status changed from Open to Fixed
Wiki page created for ‘Error Handler’ (note – not ErrorV) & noted in the PRM text.