[erlang-questions] Mystery of good term gone bad

Sverker Eriksson sverker@REDACTED
Tue Jul 28 19:44:11 CEST 2009


Edwin Fine wrote:
> Can anyone tell me why the binary to term conversion shown below is "good"
> on systems 1, 2, and 3, and bad in system 4, when the binaries are identical
> across all of them? Surely R13B01 should be backward-compatible at the
> binary level?
>
> Systems 1 & 2: R13B
> System 3: R12B-4
> System 4: R13B01
>   
:
> <<131,104,4,97,6,103,78,131,0,20,119,99,116,112,103,119,
>   95,114,101,108,64,108,111,99,97,108,104,111,115,116,0,0,
>   0,12,0,0,0,0,2,78,5,0,0,78,110,0,18,103,108,111,98,97,
>   108,95,110,97,109,101,95,115,101,114,118,101,114,131,
>   104,2,78,248,0,9,36,103,101,110,95,99,97,115,116,104,4,
>   78,65,0,12,105,110,105,116,95,99,111,110,110,101,99,116,
>   104,2,97,5,104,3,98,0,0,4,224,98,0,12,35,221,98,0,14,79,
>   143,67,131,104,4,78,76,0,6,108,111,99,107,101,114,78,77,
>   0,15,110,111,95,108,111,110,103,101,114,95,97,95,112,
>   105,100,106,103,67,131,0,0,0,13,0,0,0,0,2>>.
>   
Where did you get that binary from? It looks like the *internal* format 
used by the distribution when communicating terms between nodes. This 
format was changed in R13B01.
You could maybe argue that the old versions should give badarg for this 
binary.

/Sverker, Erlang/OTP



More information about the erlang-questions mailing list