neglecting to assign them in error cases. We'd return from the C function
into the cig C stub with random garbage still in these pointers. The
string rep converters would then treat this garbage as a real pointer to
be copied into malloc'd storage, and havoc would result.
I fixed the code to assign 0 to the pointers in error cases. I should fix
cig to pre-initialise out parameters. The only real problem code was in
userinfo1.c, but I scanned all the sources, and fixed a few suspicious cases
here and there as well.
files. These files mostly mediate between the C source (export) and
the corresponding C stub files (import) generated by the Scheme files
calling the C routines.
This provided much better argument type checking that before; lots of
small bugs were caught.
Also added const keywords wherever I could find a reasonable place
to improve error detection and efficiency.
Tuned up the makefile to reflect all of this structure. Its dependencies
were pretty out-of-date as it was. It could probably use further work.
improve the quality of the error messages.
- Fixed file-match so that if a filter procedure raises an error condition,
it is caught and treated as a match failure (as if the procedure returned
#f). This means you no longer get blown out of the water by
(file-match "." #f file-directory?)
if the cwd contains a dangling symlink, for example.
- Added set-file-times (utime).
- Caught a bug in an unused arm of the define-errno-syscall macros (rest arg
case).
- Perhaps one or two other minor tweaks.