New analysis case for Dialyzer ?

Mickael Remond mickael.remond@REDACTED
Sat Apr 9 10:47:35 CEST 2005


Here is a piece of code that contains a bug: (* are marking the
interesting lines):

*   TS = To#psock.s,
     case From#psock.mode of
         expectheaders ->
             SSL = nossl,
             case yaws:http_get_headers(From#psock.s, SSL) of
                 {R, H0} ->
                     ?Debug("R = ~p~n",[R]),
                     RStr =
                             %% FIXME handle bad_request here
                             record(R, http_response) ->
                             record(R, http_request) ->
*                               To ! {cli2srv, R#http_request.method,
                                   rewrite_path(R, From#psock.prefix))

The To variable is used as a record, but later on is used as a Pid.
I try to analyse the code with Dialyzer, but it did not suspect the
problem. Maybe analysis has been extended in the latest version of
Dialyzer (I did not try the brand new one), but I thought that actually
this piece of code might help the HiPE team.


Mickaël Rémond

More information about the erlang-questions mailing list