Ticket #201 (Fixed)Wed Apr 15 18:58:16 UTC 2009

Documentation change: size of error buffer

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.