Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  erl crash on call to http_base_64

datacompboy
Posted: Fri Oct 06, 2006 10:14 pm Reply with quote
User Joined: 21 Sep 2006 Posts: 69 Location: Novosibirsk, Russia
On
Code:
http_base_64:decode("dGVzda==\a").

erl dies with "Instruction at ... referenced memory at .... The memory could not be written"

_________________
--- suicide proc near\n call death\n suicide endp
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number
datacompboy
Posted: Sun Oct 08, 2006 7:36 am Reply with quote
User Joined: 21 Sep 2006 Posts: 69 Location: Novosibirsk, Russia
datacompboy wrote:
http_base_64:decode("dGVzda==\a").


Intresting info: if start debugger and parse module http_base_64 from inets, we got
=ERROR REPORT==== 8-Oct-2006::14:15:27 ===
Error in process <0.129.0> with exit value: {badarith,[{http_base_64,decode_base64_list,[{[29,26,pad,pad],"\n"},"set"]}]}

** exited: {badarith,[{http_base_64,decode_base64_list,[{[29,26,pad,pad],"\n"},"set"]}]} **

so, looks like that are core bug in runtime system!

... but for http_base_64 fix are simple:
change
Code:
decode_base64_list({[Sixtet1,Sixtet2,pad,pad], []}, Acc) ->

to
Code:
decode_base64_list({[Sixtet1,Sixtet2,pad,pad], _}, Acc) ->


and
Code:
decode_base64_list({[Sixtet1,Sixtet2,Sixtet3,pad], []}, Acc) ->

to
Code:
decode_base64_list({[Sixtet1,Sixtet2,Sixtet3,pad], _}, Acc) ->

_________________
--- suicide proc near\n call death\n suicide endp
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number
Guest
Posted: Thu Oct 12, 2006 3:44 pm Reply with quote
Guest
Small example of segmentation-failing code:

test() ->
[A,B,C] = [1,a,b],
(A bsl 2) bor (B bsl 3) bor C.


datacompboy wrote:
>
> datacompboy wrote:
> http_base_64:decode("dGVzda==a").
> (end of quote)
>
>
> Intresting info: if start debugger and parse module http_base_64 from inets, we got
> =ERROR REPORT==== 8-Oct-2006::14:15:27 ===
> Error in process <0.129.0> with exit value: {badarith,[{http_base_64,decode_base64_list,[{[29,26,pad,pad],"n"},"set"]}]}
>
> ** exited: {badarith,[{http_base_64,decode_base64_list,[{[29,26,pad,pad],"n"},"set"]}]} **
>
> so, looks like that are core bug in runtime system!
>
> ... but for http_base_64 fix are simple:
> change
> decode_base64_list({[Sixtet1,Sixtet2,pad,pad], []}, Acc) ->
> to
> decode_base64_list({[Sixtet1,Sixtet2,pad,pad], _}, Acc) ->
>
> and
> decode_base64_list({[Sixtet1,Sixtet2,Sixtet3,pad], []}, Acc) ->
> to
> decode_base64_list({[Sixtet1,Sixtet2,Sixtet3,pad], _}, Acc) ->
> --
> --- suicide proc near\n call death\n suicide endp
> _________________________________________________________
> Post sent from http://www.trapexit.org
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@erlang.org
> http://www.erlang.org/mailman/listinfo/erlang-bugs
>
_______________________________________________
erlang-bugs mailing list
erlang-bugs@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-bugs
Post recived from mailinglist
wailian
Posted: Tue Mar 20, 2012 2:13 am Reply with quote
Guest
i/p transducer requires a standard input and is for use with linear pneumatic actuators and has high air capacity. It can be easy change of the output signal from. electro pneumatic transducer is used, for example, in the biomedical field for the pneumatic control of a cardiac module, or artificial heart.

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