Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  Bug in stdlib

kostis at user.it.uu.se
Posted: Fri Mar 04, 2005 2:58 pm Reply with quote
Guest
Dialyzer found what we think is possibly a serious bug
in stdlib/src/erl_eval.erl

It complains about:

{erl_eval,do_apply,5}: Fun application using type an atom instead of a fun!
{erl_eval,do_apply,5}: Fun application using type an atom instead of a fun!

In the first clause, the same variable F is used in two distinct
ways: one in the head and in the patterns of the case statements.
We *think* that the variable in the case patterns should be
something else (e.g. F1).

=======================================================================
do_apply({M,F}=Func, As, Bs0, Ef, RBs)
when is_tuple(M), size(M) >= 1, is_atom(element(1, M)), is_atom(F) ->
case Ef of
none when RBs == value ->
%% Make tail recursive calls when possible.
apply(M, F, As);
none ->
ret_expr(apply(M, F, As), Bs0, RBs);
{value,F} when RBs == value ->
F(Func, As);
{value,F} ->
ret_expr(F(Func, As), Bs0, RBs)
end;
=======================================================================

Best,
Kostis


Post generated using Mail2Forum (http://m2f.sourceforge.net)

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum