[erlang-questions] CC: erl segmentation fault in http_base_64

Torbjorn Tornkvist <>
Tue Oct 10 11:06:27 CEST 2006


Meanwhile, it is good to have the Dialyzer:

# dialyzer -c dcb.beam
Checking whether the initial PLT exists and is up-to-date... yes
                                                   Proceeding with
analysis...
{dcb,crash,2}: Call to function 'bsl' with signature
((integer(),integer()) -> integer()) will fail since the arguments are
of type ('atom',1)!
done (warnings were emitted)


--Tobbe


Matthias Lang wrote:
> datacompboy writes:
> 
>  > Is am right, and this crashdump was reproduceable in other cases other than http_base_64 ?
> 
> Yes. 
> 
> http_base_64 is just plain Erlang code. You can find it in your
> installation, e.g. on a unix system:
> 
>   ~ >locate http_base_64.erl
>   /usr/local/lib/erlang/lib/inets-4.7.2/src/http_base_64.erl
> 
> and then it's an interesting little exercise in "differential
> analysis" to cut it down to a shorter program which also
> crashes. Here's how far I got in fifteen minutes:
> 
>      -module(dcb).
>      -export([crash/0]).
>      
>      crash() -> crash(0,atom).
>      crash(_,X) -> 0 bsl (X bsl 1) bsl 0.
> 
> Matthias
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
> 




More information about the erlang-questions mailing list