[erlang-bugs] binary_to_term can crash erl

Matthew Dempsky <>
Mon Feb 4 01:29:36 CET 2008

Calling binary_to_term can cause the erl interpreter to crash:

    1> binary_to_term(iolist_to_binary([<<131, 100, 65000:16>> |
lists:duplicate(65000, 42)])).

    Crash dump was written to: erl_crash.dump
    absurdly large atom
    Abort trap

I think binary_to_term should instead just kill the process that
called binary_to_term, similar to calling list_to_atom on a list that
is too large.

Also, it's possible to create atoms larger than 255 characters this way.

More information about the erlang-bugs mailing list