[erlang-questions] Decoding term with ei that has a map with long atom keys

Erik Axling axling@REDACTED
Thu Dec 11 00:18:43 CET 2014


Hello!

I ran into an issue where ei_decode_version seems to fail when trying to
decode a term that contains a map with large atom keys.

My message that is sent to the port looks something like this:

erlang:port_command(Port, term_to_binary({cmd, type, undefined,
#{asdadasdsadasdasdasdasda=>sadsadsada,asdsadsadsadsadsadsadasdasdsadasb=>sdsdsdsdsdb})).

This fails in my port pretty quickly when doing ei_decode_version(but,
&index, &version).

It works when i send a message similar to

erlang:port_command(Port, term_to_binary({cmd, type, undefined, #{b=>s,
a=>s})).

Erlang version is :
Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:4:4] [async-threads:10]
[hipe] [kernel-poll:false]

Eshell V6.2  (abort with ^G)

Running this on a Macbook Air if that is interesting.


I know that the maps feature is still a bit experimental so just would like
to know if this is a known issue of if I'm understanding something wrong?

/axling
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141211/26c83793/attachment.htm>


More information about the erlang-questions mailing list