[erlang-bugs] proc_lib relies on immutable dictionary
mats cronqvist
masse@REDACTED
Thu Nov 27 14:30:33 CET 2008
an excellent one-liner in R12-3 (and earlier);
1> proc_lib:spawn_link(fun()->erase(),a=b end).
** exception exit: {badmatch,b}
and in R12B-5;
1> proc_lib:spawn_link(fun()->erase(),a=b end).
=ERROR REPORT==== 27-Nov-2008::14:25:41 ===
Error in process <0.192.0> on node 'erl@REDACTED' with exit value: {{badmatch,undefined},[{proc_lib,exit_p,2}]}
** exception error: no match of right hand side value undefined
in function proc_lib:exit_p/2
the relevant function in R12B-4;
exit_p(Class, Reason, StartF) ->
_ = crash_report(Class, Reason, StartF),
exit(Reason).
and in R12B-5;
exit_p(Class, Reason) ->
{M,F,A} = get('$initial_call'),
MFA = {M,F,make_dummy_args(A, [])},
crash_report(Class, Reason, MFA),
exit(Reason).
exit_p now (for no apparent reason) relies on the user not clearing
the dictionary.
mats
More information about the erlang-bugs
mailing list