Erlang/OTP Forums

Author Message

<  Erlang patches mailing list  ~  Bug in erl_term_len()

ViktorPracht at gmx.de
Posted: Tue Jun 21, 2005 4:01 pm Reply with quote
Guest
Hello

The erl_interface function erl_term_len() reports a wrong size for functions
with parameters (it doesn't count the byte that specifies the arity). Here's
a patch:

--- erl_marshal(original).c 2005-04-07 08:11:42.000000000 +0200
+++ erl_marshal.c 2005-06-21 17:08:31.808018328 +0200
_at__at_ -545,7 +545,7 _at__at_
for (i = 0; i < ERL_CLOSURE_SIZE(ep); i++)
len += erl_term_len_helper(ERL_CLOSURE_ELEMENT(ep,i), dist);
} else {
- len = 1 + 4 + 16 + 4 + 4;
+ len = 1 + 1 + 4 + 16 + 4 + 4;
len += erl_term_len_helper(ERL_FUN_MODULE(ep),dist);
len += erl_term_len_helper(ERL_FUN_INDEX(ep),dist);
len += erl_term_len_helper(ERL_FUN_UNIQ(ep),dist);



- Viktor Pracht

--
Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++


Post generated using Mail2Forum (http://m2f.sourceforge.net)
Abedtedbasder
Posted: Mon Apr 09, 2007 4:22 am Reply with quote
Guest
Nicole Kidman *beep*!
http://Nicole-Kidman-*beep*.org/WindowsMediaPlayer.php?movie=231891

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