|Title||ANSI plinth does not check its arguments|
|Assigned user||Gareth Rees|
|Description||In mpsioan.c , there are comments like this:|
FILE *f = (FILE *)mps_io; /* Should check f == ioFile */
If we had actually used assertions instead of comments, then we might have easily caught job003503. (By checking f != NULL, though, not f == ioFile.)
|Analysis||It's not clear to me why there are comments here and no assertions. I guess this is for a combination of the following reasons:|
1. The plinth is not supposed to use internal MPS features, so it can't use AVER.
2. But if it uses assert() instead then these are outside the control of the MPS variety mechanism so they may end up being turned on in HOT variety or turned off in COOL variety (depending on whether or not the client program compiles the MPS with NDEBUG defined).
|Created by||Gareth Rees|
|Created on||2013-05-30 15:10:52|
|Last modified by||Gareth Rees|
|Last modified on||2013-09-11 14:15:48|
|History||2013-05-30 GDR Created.|
|182327||closed||2013-05-30 16:21:42||Gareth Rees||ANSI I/O module checks its arguments using AVER.|