aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/bif.tab
AgeCommit message (Collapse)Author
2010-05-17Add bin_to_list/{1,2,3}Patrik Nyblom
Add testcases for bin_to_list. Teach binref.erl bin_to_list.
2010-05-17Add binary:longest_common_prefix/longest_common_suffixPatrik Nyblom
Add allcoator parameter to erts_get_aligned_binary_bytes_extra. Add testcases for the functions above. Add reference implementation for the functions above.
2010-05-17Add binary:part to erl_bif_binary.cPatrik Nyblom
Change name of the 'scope' option for binary:match/matches. Add split and replace to binary.erl. Cleanup comments etc in binary.erl and atom.names Add testcases for part, split, replace and scopes.
2010-05-17Teach binary.c the semantics to take longest instead of shortest matchPatrik Nyblom
Add testcase embryos and reference implementation. Change name of compile function according to EEP31.
2010-05-17Initial commit of the binary EEPPatrik Nyblom
2010-01-12Merge branch 'jv/binary_to_term-opts' into ccase/r13b04_devErlang/OTP
* jv/binary_to_term-opts: document ErtsExternalDist flags and CON_ID mask add options to binary_to_term OTP-8367 There is new erlang:binary_to_binary/2 BIF that takes an option list. The option safe can be used to prevent creation of resources that are not garbage collected (such as atoms). (Thanks to Jayson Vantuyl.)
2010-01-08add options to binary_to_termJayson Vantuyl
term_to_binary and binary_to_term are powerful tools that can be used easily in lieu of a custom binary network protocol. Unfortunately, carefully crafted data can be used to exhaust the memory in an Erlang node by merely attempting to decode binaries. This makes it unsafe to receive data from untrusted sources. This is possible because binary_to_term/1 will allocate new atoms and new external function references. These data structures are not garbage collected. This patch implements the new form of binary_to_term that takes a list of options, and a simple option called 'safe'. If specified, this option will cause decoding to fail with a badarg error if an atom or external function reference would be allocated. In the general case, it will happily decode any Erlang term other than those containing new atoms or new external function references. However, fun, pid, and ref data types can embed atoms. They might fail to decode if one of these embedded atoms is new to the node. This may be an issue if encoded binaries are transferred between nodes or persisted between invocations of Erlang.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP