[m-rev.] for post-commit review: Parallel runtime system improvments.

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Apr 14 14:07:10 AEST 2011


On Wed, 13 Apr 2011, Paul Bone wrote:

> library/io.m:
>    Make this module compatible with MR_debug_threads.

...

> Index: library/io.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/library/io.m,v
> retrieving revision 1.456
> diff -u -p -b -r1.456 io.m
> --- library/io.m	4 Apr 2011 07:10:39 -0000	1.456
> +++ library/io.m	13 Apr 2011 12:03:39 -0000
> @@ -2550,7 +2550,7 @@ io.check_err(Stream, Res, !IO) :-
>     }
>
>     ML_maybe_make_err_msg(RetVal != 0, errno, ""read failed: "",
> -        MR_PROC_LABEL, MR_TRUE, RetStr);
> +        ""io.ferror/5"", MR_TRUE, RetStr);
>     MR_update_io(IO0, IO);

That looks incorrect.   The 4th argument of ML_maybe_make_err_msg should
be a label not a string literal.  (It gets passed to MR_offset_incr_hp_atomic_msg
and in the memprof grades the label will be used.)

I think the cause of warnings here (discussed in-person with Paul) is
that the definition of ML_maybe_make_err_msg is incorrect.  It should be
calling MR_STRINGIZE on procname before passing that to
MR_{LOCK,UNLOCK,OBTAIN_GLOBAL_LOCK,RELEASE_GLOBAL_LOCK}.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list