Erl_call bug in R9C-0

Kent Boortz kent@REDACTED
Thu Apr 15 05:42:11 CEST 2004


Sorry about this, it is a typical "copy and paste" bug :-(
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@REDACTED> 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
> @@ -512,14 +512,14 @@
>  	  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);



More information about the erlang-patches mailing list