[M3devel] readdir/malloc
Jay
jay.krell at cornell.edu
Sun Apr 12 05:00:39 CEST 2009
cvsup source says:
(*****************************************************************************)
(* FIXME - The following procedures work around a bug in SRC Modula-3 thru
version 3.6, at least. The FS.Iterator operations call the Unix
opendir, readdir, and closedir functions, which in turn usually call
malloc. This is done without any mutual exclusion, and malloc is normally
not thread-safe. I have observed memory corruption and have traced it
to this cause. As a work-around, these wrappers disable thread switching
while the offending functions are executing. *)
(*****************************************************************************)
This is already fixed wrt opendir/closedir in cm3.
But readdir?
True?
I guess I'll be pessimistic and assume it is true.
- Jay
More information about the M3devel
mailing list