Erlang Mailing Lists

Author Message

<  Erlang bugs mailing list  ~  Cover blows up on parsing binary comprehension

Guest
Posted: Fri Dec 11, 2009 4:48 pm Reply with quote
Guest
-module(foo).

-export([f/0, g/1]).

f() ->
cover:start(),
{ok,foo} = cover:compile_module(foo).

g(SeqIds) -> << <<3:2, SeqId:62>> || SeqId <- SeqIds >>.

$ erlc -Wall -v +debug_info foo.erl
$ erl
Erlang R13B03 (erts-5.7.4) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.4 (abort with ^G)
1> foo:f().

=ERROR REPORT==== 11-Dec-2009::16:10:15 ===
Error in process <0.35.0> with exit value: {{badmatch,{bin,9,[{bin_element,9,{integer,9,3},{integer,9,2},default},{bin_element,9,{var,9,'SeqId'},{integer,9,62},default}]}},[{cover,munge_expr,2},{cover,munge_body,4},{cover,munge_clauses,4},{cover,munge,4},{cover,transform_2...

** exception exit: {{badmatch,{bin,9,
[{bin_element,9,{integer,9,3},{integer,9,2},default},
{bin_element,9,{var,9,'SeqId'},{integer,9,62},default}]}},
[{cover,munge_expr,2},
{cover,munge_body,4},
{cover,munge_clauses,4},
{cover,munge,4},
{cover,transform_2,5},
{cover,transform,4},
{cover,do_compile_beam,2},
{cover,main_process_loop,1}]}
in function cover:call/1
in call from cover:compile_modules/3
in call from cover:compile_module/2
in call from foo:f/0


________________________________________________________________
erlang-bugs mailing list. See http://www.erlang.org/faq.html
erlang-bugs (at) erlang.org

Post received from mailinglist
Hans Bolinder
Posted: Mon Dec 14, 2009 2:20 pm Reply with quote
User Joined: 05 Nov 2008 Posts: 24 Location: Stockholm
[Matthew Sackman:]
> g(SeqIds) -> << <<3:2, SeqId:62>> || SeqId <- SeqIds >>.

Thanks!

There is a patch on GitHub, see

http://github.com/erlang/otp/commit/420b28bb007946307eeda5d4e2bf200fe0ee25ba

Best regards,

Hans Bolinder, Erlang/OTP team, Ericsson

________________________________________________________________
erlang-bugs mailing list. See http://www.erlang.org/faq.html
erlang-bugs (at) erlang.org

Post received from mailinglist
View user's profile Send private message

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