Erlang Mailing Lists

Author Message

<  Erlang patches mailing list  ~  Erl_call bug in R9C-0

svg at surnet.ru
Posted: Tue Apr 13, 2004 9:59 am Reply with quote
Guest
Good day,

There is small bug in lib/erl_interface/src/prog/erl_call.c from
R9C-0.

Here is a patch.

Best Regards,
Vladimir Sekissov

diff -Naur otp_src_R9C-0.orig/lib/erl_interface/src/prog/erl_call.c otp_src_R9C-0/lib/erl_interface/src/prog/erl_call.c
--- otp_src_R9C-0.orig/lib/erl_interface/src/prog/erl_call.c 2003-08-01 15:07:02.000000000 +0600
+++ otp_src_R9C-0/lib/erl_interface/src/prog/erl_call.c 2004-04-13 14:04:26.000000000 +0600
_at__at_ -512,14 +512,14 _at__at_
ei_x_buff reply;

ei_encode_list_header(NULL, &i, 1);
- ei_encode_binary(NULL, &i, module, modsize);
+ ei_encode_string_len(NULL, &i, evalbuf, len);
ei_encode_empty_list(NULL, &i);

p = (char *)malloc(i);
i = 0; /* Reset */

ei_encode_list_header(p, &i, 1);
- ei_encode_binary(p, &i, module, modsize);
+ ei_encode_string_len(p, &i, evalbuf, len);
ei_encode_empty_list(p, &i);

ei_x_new_with_version(&reply);


Post generated using Mail2Forum (http://m2f.sourceforge.net)
kent at erix.ericsson.se
Posted: Thu Apr 15, 2004 3:42 am Reply with quote
Guest
Sorry about this, it is a typical "copy and paste" bug Sad
We are expanding the test cases for 'erl_interface' but haven't
added any for erl_call yet.

Seem to be enough just to change the arguments, no need to use
ei_encode_string_len() that I can see, do you know a reason?

% echo 'X=1,Y=2,{X,Y}.' | erl_call -sname foo -e
{ok, {1, 2}}

Thank you for reporting this,

kent


Vladimir Sekissov <svg_at_surnet.ru> writes:
> There is small bug in lib/erl_interface/src/prog/erl_call.c from
> R9C-0.
>
> Here is a patch.
>
> Best Regards,
> Vladimir Sekissov
>
> diff -Naur otp_src_R9C-0.orig/lib/erl_interface/src/prog/erl_call.c otp_src_R9C-0/lib/erl_interface/src/prog/erl_call.c
> --- otp_src_R9C-0.orig/lib/erl_interface/src/prog/erl_call.c 2003-08-01 15:07:02.000000000 +0600
> +++ otp_src_R9C-0/lib/erl_interface/src/prog/erl_call.c 2004-04-13 14:04:26.000000000 +0600
> _at__at_ -512,14 +512,14 _at__at_
> ei_x_buff reply;
>
> ei_encode_list_header(NULL, &i, 1);
> - ei_encode_binary(NULL, &i, module, modsize);
> + ei_encode_string_len(NULL, &i, evalbuf, len);
> ei_encode_empty_list(NULL, &i);
>
> p = (char *)malloc(i);
> i = 0; /* Reset */
>
> ei_encode_list_header(p, &i, 1);
> - ei_encode_binary(p, &i, module, modsize);
> + ei_encode_string_len(p, &i, evalbuf, len);
> ei_encode_empty_list(p, &i);
>
> ei_x_new_with_version(&reply);


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