aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface
AgeCommit message (Collapse)Author
2010-11-08Add release notes for erl_interface-3.7.1.1Björn-Egil Dahlberg
2010-11-08Fix faulty tracelevel in erl_interfaceBjörn-Egil Dahlberg
2010-10-29ei: check memory was allocatedMichael Santos
2010-10-29ei: error if return value of ei_alloc_big is NULLMichael Santos
2010-10-26ei: check the length of the node nameMichael Santos
Check the length of the node name to prevent an overflow.
2010-10-14Merge branch 'ms/fix-zero-byte-allocation' into devBjörn-Egil Dahlberg
* ms/fix-zero-byte-allocation: registry: fix zero byte allocation OTP-8893
2010-10-14Merge branch 'sv/ei-number-parsing' into devBjörn-Egil Dahlberg
* sv/ei-number-parsing: teach ei_x_format to handle unary - and + OTP-8891
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-10-06registry: fix zero byte allocationMichael Santos
Pasto in code results in 0 bytes (instead of length bytes) being allocated when the length of the key exceeds the static buffer.
2010-10-06erl_call: remove get_hostentMichael Santos
get_hostent does not properly handle IPv4 addresses on little endian platforms and fails with hostnames beginning with a number. Remove get_hostent and use ei_gethostbyname directly since gethostbyname supports IPv4 addresses. Reported-By: Julien Barbot
2010-09-13Prepare releaseOTP_R14BErlang/OTP
2010-09-13Merge branch 'pan/epmd-vulnerabilities/OTP-8780' into devPatrik Nyblom
* pan/epmd-vulnerabilities/OTP-8780: Teach testcases to survive TIME_WAIT overload Update erl_interface doc and testsuite for epmd changes Restore null termination of input buffer Teach testcase epmd_SUITE:too_large to accept econnaborted Teach epmd_cli.c to not respond 'Killed' when killing denied Calculate minimal packet size for ALIVE2 requests correctly Document epmd and it's options properly and fixup help text Fix anomalies in epmd not yet reported as security issues Remove two buffer overflow vulnerabilities in EPMD Remove all support for ancient EPMD protocol Remove very old protocol from EPMD Conflicts: lib/erl_interface/src/epmd/epmd_port.c
2010-09-13Merge branch 'sv/ei-writev' into devBjörn-Egil Dahlberg
* sv/ei-writev: fix incorrect writev iovec buffer handling in ei OTP-8837
2010-09-13Teach Winsock initialization to be thread safePatrik Nyblom
2010-09-13Make ei_threaded_send synchronizedPatrik Nyblom
2010-09-13Increase timeout value in ei_accept_SUITEPatrik Nyblom
2010-09-13Teach ei_accept_SUITE to wait for node publish instead of using random sleepsPatrik Nyblom
2010-09-13Merge branch 'egil/ei/fix-declspec/OTP-8826' into devBjörn-Egil Dahlberg
* egil/ei/fix-declspec/OTP-8826: Remove USE_DECLSPEC_THREAD from erl_interface
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-09-10Remove USE_DECLSPEC_THREAD from erl_interfaceBjörn-Egil Dahlberg
DECLSPEC causes access violations on vista.
2010-09-08erl_call: fix multiple buffer overflowsMichael Santos
Check operations that can overflow, e.g., erl_call -sname $(perl -e 'print "x"x5000') perl -e 'print "-module(", "x"x10000, ");"' | erl_call -m -r -sname foo
2010-09-07Merge branch 'mk/net-dragonfly-bsd-patches' into devBjörn Gustavsson
* mk/net-dragonfly-bsd-patches: Remove unused variables Use proper install method Add support for DragonFly BSD Add support for NetBSD
2010-09-06Merge branch 'ms/ei-overflow-fix' into devBjörn-Egil Dahlberg
* ms/ei-overflow-fix: ei: prevent overflow in ei_connect_init/ei_xconnect OTP-8814
2010-08-31Update erl_interface doc and testsuite for epmd changesPatrik Nyblom
2010-08-31Remove all support for ancient EPMD protocolPatrik Nyblom
2010-08-23ei: prevent overflow in ei_connect_init/ei_xconnectMichael Santos
Check the length of the buffer before copying. ei_cnode ec; struct in_addr addr; char *node = (char *)calloc(5001, 1); (void)memset(node, 'x', 5000); ei_connect_init(&ec, node, "", 0); addr.s_addr = inet_addr("192.168.1.1"); ei_xconnect(&ec, &addr, node);
2010-08-23ei_connect: correct man page examplesMichael Santos
2010-08-13Add support for DragonFly BSDMartti Kuparinen
These are the current NetBSD pkgsrc patches.
2010-07-29Merge branch 'cg/small-typos' into devBjörn Gustavsson
2010-07-27Fix compiler warnings in erl_interfaceBjörn-Egil Dahlberg
- Removed unused variable in ei_decode_term.c - Fixed faulty deallocation
2010-07-26Fix minor typos and errors in documentationCristian Greco
2010-07-05term_to_binary use all 32 bits of INTEGER_EXTSverker Eriksson
Earlier, external format INTEGER_EXT was only produced for 28-bit signed integers. Now full 32-bit signed integers are produced as INTEGER_EXT to avoid the more costly SMALL_BIG_EXT format. Both old and new code can read 32-bit INTEGER_EXT. Also fixed integer encoding bugs in erl_interface erl_encode/erl_decode. (Thanks to Alexander Demidenko for reporting)
2010-06-14OTP-8711 Make ei build on VxWorksBjörn-Egil Dahlberg
Make erl_interface build on VxWorks
2010-06-11Update release notesBjörn Gustavsson
2010-06-10Update version numbersBjörn Gustavsson
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-07Fix ei_tmo to restrict dflags to NEW_FLOAT_EXTBjörn-Egil Dahlberg
Erl_Interface is updated to restrict distribution to NEW_FLOAT_EXT only. The testsuite ei_tmo is updated to reflect that.
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.
2010-06-07fix typo in ei_decode_ei_term documentationSteve Vinoski
Change "encoding" to "decoding" where the documentation describes the return value 0.
2010-05-02Merge branch 'bg/remove-stray-ose-support' into devErlang/OTP
* bg/remove-stray-ose-support: configure: Remove stray OSE/Delta support Makefiles: Remove stray OSE/Delta support kernel tests: Remove stray OSE/Delta support system tests: Remove stray OSE/Delta support erl_interface tests: Remove stray OSE/Delta support epmd: Remove stray OSE/Delta support epmd: #ifdef out start_epmd() for other platforms than VxWorks emulator tests: Remove stray OSE/Delta support emulator: Remove stray OSE/Delta support emulator: Eliminate #ifdef for sys_tty_reset() test_server: Remove stray support for OSE/Delta OTP-8585 bg/remove-stray-ose-support
2010-04-30erl_interface tests: Remove stray OSE/Delta supportBjörn Gustavsson
2010-03-19erl_call: fix documentation of -a optionMagnus Henoch
The default value for Fun is start, not [] as the documentation used to suggest. Also, format [] with <c> instead of <em> since it is a code fragment, not an emphasised word.
2010-03-16Merge branch 'ml/documentation_apostrophe_fix' into devErlang/OTP
* ml/documentation_apostrophe_fix: Correct grammatical problems in conjunction with 'its' Change all incorrect occurrences of it's to its OTP-8523 ml/documentation_apostrophe_fix
2010-03-16Change all incorrect occurrences of it's to itsMatthias Lang
The documentation (*.xml) in the otp tree has a common grammatical problem, "it's" and "its" are often interchanged. That is annoying for some readers. This commit consists entirely of "it's" -> "its" changes. I went through every .xml file in the tree. If there are any remaining bugs of this type, it's because I missed them, not because I didn't look.
2010-02-22OTP-8466: Fix ei to build on vxworksBjörn-Egil Dahlberg
2010-02-19Update release notesBjörn-Egil Dahlberg
2010-02-03OTP-8323 Cross compilation improvements and other build systemRickard Green
improvements. Most notable: Lots of cross compilation improvements. The old cross compilation support was more or less non-existing as well as broken. Please, note that the cross compilation support should still be considered as experimental. Also note that old cross compilation configurations cannot be used without modifications. For more information on cross compiling Erlang/OTP see the $ERL_TOP/xcomp/README file. Support for staged install using <url href="http://www.gnu.org/prep/standards/html_node/DESTDIR.html">D ESTDIR</url>. The old broken INSTALL_PREFIX has also been fixed. For more information see the $ERL_TOP/README file. Documentation of the release target of the top Makefile. For more information see the $ERL_TOP/README file. make install now by default creates relative symbolic links instead of absolute ones. For more information see the $ERL_TOP/README file. $ERL_TOP/configure --help=recursive now works and prints help for all applications with configure scripts. Doing make install, or make release directly after make all no longer triggers miscellaneous rebuilds. Existing bootstrap system is now used when doing make install, or make release without a preceding make all. The crypto and ssl applications use the same runtime library path when dynamically linking against libssl.so and libcrypto.so. The runtime library search path has also been extended. The configure scripts of erl_interface and odbc now search for thread libraries and thread library quirks the same way as erts do. The configure script of the odbc application now also looks for odbc libraries in lib64 and lib/64 directories when building on a 64-bit system. The config.h.in file in the erl_interface application is now automatically generated in instead of statically updated which reduces the risk of configure tests without any effect.
2010-02-02Merge branch 'sf/erl_match-longlong' into ccase/r13b04_devErlang/OTP
* sf/erl_match-longlong: erl_interface: Allow erl_match() to match ERL_LONGLONG and ERL_U_LONGLONG terms OTP-8400 Allow erl_match() to match ERL_LONGLONG and ERL_U_LONGLONG terms (Thanks to Scott Lystig Fritchie).
2010-01-23erl_interface: Allow erl_match() to match ERL_LONGLONG and ERL_U_LONGLONG termsScott Lystig Fritchie
The Erlang/OTP distro now includes 90% of what's required to handle signed and unsigned ints up to 8 bytes long, so add this remaining (?) 10%.