aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src/misc
AgeCommit message (Collapse)Author
2014-03-06erl_interface: Add ei encode/decode for mapsSverker Eriksson
2013-02-18erl_interface,ic: Remove node_org_enc from erlang_{pid,port,ref}Sverker Eriksson
in order to be backward compatible with user code that accesses the members of erlang_pid and friend. The documentation does not mention the content of these structs, but we have example code that does. So the safe way it the revert the node_org_enc field (added in R16A) and instead determine in runtime which atom encoding to use depending on if the node atom contains unicode (>255) characters or not.
2013-02-07erl_interface: Change enum erlang_char_encoding to a typedefSverker Eriksson
to make the API independent of the actual type of erlang_char_encoding
2013-01-28Merge branch 'lukas/erl_interface/test_atom_as_functions/OTP-10753'Lukas Larsson
* lukas/erl_interface/test_atom_as_functions/OTP-10753: Return if size test fails Add utf8 atom encode and decode testcases Validate UTF8/ASCII when buf is NULL
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-25Return if size test failsLukas Larsson
This is needed in order to avoid potential buffer overruns in the encode functions
2013-01-25Validate UTF8/ASCII when buf is NULLLukas Larsson
2013-01-22erl_interface: even more utf8 atom stuffSverker Eriksson
2013-01-18erl_interface: utf8 atoms continuedSverker Eriksson
2013-01-08erl_interface: Enable decode of unicode atomsSverker Eriksson
No API changes or additions. Just the ability for erl_interface to decode unicode atoms and convert them into latin1 strings to preserve backward compatibility for the existing API.
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-01-03ei: Remove unused variable in ei_format.cBjörn-Egil Dahlberg
2011-09-07Make comment reflect code in erl_interface/src/misc/ei_decode_term.cAnneli Cuss
Note that ei_decode_term.h has the correct behaviour described! Also removed extraneous '/* return 0; */' comments.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-02-22ei: buffer overflow when decoding atomsMichael Santos
2011-01-03Merge branch 'vb/ei-exts' into devBjörn-Egil Dahlberg
* vb/ei-exts: Fix testcases erl_global_whereis, erl_global_names Fix wrong erl_compare_ext result comparing lists Correct erl_global{register, unregister} functions Add PID (~p) type parameters to ei_format Add char (~c) type parameters to ei_format OTP-9015 Conflicts: lib/erl_interface/include/ei.h
2010-12-15Remove ancient distribution message DOP_NODE_LINK from all codePatrik Nyblom
2010-12-08Add PID (~p) type parameters to ei_formatVitaliy Batichko
2010-12-08Add char (~c) type parameters to ei_formatVitaliy Batichko
2010-10-29ei: check memory was allocatedMichael Santos
2010-10-29ei: error if return value of ei_alloc_big is NULLMichael Santos
2010-10-06teach ei_x_format to handle unary - and +Steve Vinoski
Teach the format string parser used for ei_x_format() and ei_x_format_wo_ver() about unary negative and positive operators on numbers. Previously, passing a negative numeric constant or a positive numeric constant with an explicit leading plus sign within the format string would cause these functions to fail. Augment the format_wo_ver unit test in the ei_format suite with a regression test for these cases. An easy way to reproduce the problem is to use erl_call: erl_call -s foo@bar -a 'erlang list_to_integer [-1]' Without this change, erl_call fails with a -1 exit status. With this change, it properly prints "-1".
2010-09-11fix incorrect writev iovec buffer handling in eiSteve Vinoski
For platforms that support writev, ei uses iovec structures to be able to easily send noncontiguous data buffers. When sending large messages, the socket can of course block, in which case ei adjusts its iovecs to pick up where it left off when the socket becomes writeable again. Unfortunately the code that handled the case when the number of bytes written are less than the current iovec size adjusted only the iovec byte count but not the iovec data pointer, resulting in the same data being sent multiple times. The fix is trivial: in addition to subtracting the count of bytes already written from the current iovec's size, also increment the current iovec's data pointer by the number of bytes already written. Tested manually on Linux and verified to fix a problem detected in production with writing large binaries from a cnode to a regular node. No unit tests were added, however, because they use the local loopback which acts more like a pipe than an inter-host TCP connection. The closing of the TCP window on the receiving side and the resultant write blocking on the socket, which in turn caused the code that mishandled the iovecs to be exercised, could unfortunately not be readily duplicated in the erl_interface test suite.
2010-07-27Fix compiler warnings in erl_interfaceBjörn-Egil Dahlberg
- Removed unused variable in ei_decode_term.c - Fixed faulty deallocation
2010-06-08Merge branch 'sv/serge-new_float_ext' into devErlang/OTP
* sv/serge-new_float_ext: Let ei_get_type() return ERL_FLOAT_EXT instead of NEW_FLOAT_EXT Fix ei_tmo to restrict dflags to NEW_FLOAT_EXT compact IEEE 754 double encoding in external binary format for ei fix typo in ei_decode_ei_term documentation OTP-8684 sv/serge-new_float_ext compact IEEE 754 double encoding in external binary format for ei Implement the compact IEEE 754 double encoding in external binary format for ei. Encoding for ei now always produces the NEW_FLOAT_EXT format. Decoding and term printing handle both the old ERL_FLOAT_EXT encoding and the new NEW_FLOAT_EXT encoding. Legacy erl_interface code also handles the new encoding, but still produces the ERL_FLOAT_EXT encoding by default. Also enable the DFLAG_NEW_FLOATS distribution flag. ei_get_type() will return ERL_FLOAT_EXT regardless if the external format is encoded with ERL_FLOAT_EXT or NEW_FLOAT_EXT for doubles. Reduce the number of copies of the code for encoding and decoding doubles throughout ei and erl_interface by instead calling the ei encoding and decoding functions wherever possible. Restore commented-out float tests in ei_decode_SUITE and ei_encode_SUITE in lib/erl_interface/test. Modify them to make them match the style of other tests in the same suites. These changes are based on an ei float patch from Serge Aleynikov originally submitted against R12B-2 in July 2008 and reworked by Steve Vinoski May 2010.
2010-06-07Let ei_get_type() return ERL_FLOAT_EXT instead of NEW_FLOAT_EXTBjörn-Egil Dahlberg
2010-06-07compact IEEE 754 double encoding in external binary format for eiSteve Vinoski
Implement the compact IEEE 754 double encoding in external binary format for ei. Encoding for ei now always produces the NEW_FLOAT_EXT format. Decoding and term printing handle both the old ERL_FLOAT_EXT encoding and the new NEW_FLOAT_EXT encoding. Legacy erl_interface code also handles the new encoding, but still produces the ERL_FLOAT_EXT encoding by default. Also enable the DFLAG_NEW_FLOATS distribution flag. Reduce the number of copies of the code for encoding and decoding doubles throughout ei and erl_interface by instead calling the ei encoding and decoding functions wherever possible. Restore commented-out float tests in ei_decode_SUITE and ei_encode_SUITE in lib/erl_interface/test. Modify them to make them match the style of other tests in the same suites. These changes are based on an ei float patch from Serge Aleynikov originally submitted against R12B-2 in July 2008.
2009-12-17Fix duplicate ei_tracelevel symbolBjörn-Egil Dahlberg
The symbol ei_tracelevel was not declared extern which could crash the linking step on some compilers. Updated .gitignore to ignore object files in erl_interface.
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP