aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
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.
2010-01-06Update preloaded filesBjörn Gustavsson
2010-01-06Mark concat_binary/1 as deprecatedBjörn Gustavsson
2009-12-21Order version fields in documentation for ALIVE2_REQ correctlyKlas Johansson
Place HighestVersion before LowestVersion, since that is what the source code does (erl_epmd.erl and epmd_srv.c).
2009-12-17Merge branch 'at/windows_build_fixes' into ccase/r13b04_devErlang/OTP
* at/windows_build_fixes: Updated README.win32 for compiling with VS2008 and issues with mc.exe Allow mc.sh and rc.sh to work when path to mc/rc.exe has spaces OTP-8345 Building on Windows will now work if the paths to mc.exe and rc.exe contain spaces. The README.win32 file has been updated with some information about building using Visual Studio 2008. (Thanks to Andrew Thompson.)
2009-12-17Send up AssocID as unsignedBjörn Gustavsson
It must be unsigned so that prim_inet will not reject when it is sent down again. (Suggested fix by Raimo for a bug reported by Simon Cornish.)
2009-12-15Allow mc.sh and rc.sh to work when path to mc/rc.exe has spacesAndrew Thompson
The eval call in these scripts was failing for me because the path to them on my windows machine contained spaces. I also fixed some copy/paste-os from when (evidently) the mc.sh script was created by copying the rc.sh script and modifying it.
2009-12-15Merge branch 'sc/darwin_build_rm_dSYMN' into ccase/r13b04_devErlang/OTP
* sc/darwin_build_rm_dSYMN: Fix 'make clean' in erts with debug builds under Darwin
2009-12-14Fix 'make clean' in erts with debug builds under DarwinSimon Cornish
The Apple compiler creates DWARF debugging symbols in a bundle (ie. a directory) named <name>.dSYM In order for make clean to work correctly, the rm command needs -r
2009-12-14Merge branch 'bg/on_load' into ccase/r13b04_devErlang/OTP
* bg/on_load: Test on_load functions that don't return 'ok' Change the expected return value for on_load functions OTP-8339 The expected return value for an on_load function has been changed. (See the section about code loading in the Reference manual.)
2009-12-13OTP-8341 Minor alignment adjustments of scheduler specific data.Rickard Green
2009-12-13Change the expected return value for on_load functionsBjörn Gustavsson
An on_load function is supposed to return 'true' to indicate that the module should be loaded, and 'false' if it should be unloaded. But returning any other term, as well as causing an exception, will also unload the module. Since we don't like boolean values mixed with other values, change the expected return value as follows: * If 'ok' is returned, the module will remain loaded and become callable. * If any other value is returned (or an exception is generated), the module will be unloaded. Also, if the returned value is not an atom, send a warning message to the error_logger (using error_logger:warning_msg/2). The new interpretation of the return value means that an on_load function can now directly return the return value from erlang:load_nif/2.
2009-12-11OTP-8323 Miscellaneous cross compilation improvements. For example, oneRickard Green
new mandatory configuration variable that replaces all other previously mandatory configuration variables, and better documentation. Note that old cross compilation configurations cannot be used without modifications. For more information see the $ERL_TOP/xcomp/README file.
2009-12-11Merge branch 'bg/slimmer-history' into ccase/r13b04_devErlang/OTP
* bg/slimmer-history: beam_makepos: Do not put any dates in generated files compiler: Teach 'slim' to omit compilation info
2009-12-09beam_makepos: Do not put any dates in generated filesBjörn Gustavsson
We don't want to have dates in files that are checked-in as part of the bootstrap compiler (such as beam_opcodes.{erl,hrl}) as a new version will be created every time.
2009-12-09Update .gitignore filesBjörn Gustavsson
2009-12-09OTP-8304 Incompatible changes in the experimental NIF feature. Changed theSverker Eriksson
NIF function prototypes in order to allow more than 3 function arguments. Also an incompatible change in the return value of erlang:load_nif/2. Added support for references, floats and term comparison in NIFs. Read more in the documentation of erl_nif and erlang:load_nif/2.
2009-12-09OTP-8304 Incompatible changes in the experimental NIF feature. Changed theSverker Eriksson
NIF function prototypes in order to allow more than 3 function arguments. Also an incompatible change in the return value of erlang:load_nif/2. Added support for references, floats and term comparison in NIFs. Read more in the documentation of erl_nif and erlang:load_nif/2.
2009-12-08documentation: Fix erlang:split_binary/2 Pos argumentAleksey Yeschenko
The correct value for the second argument to erlang:split_binary/2 (Pos) is 0, not 1.
2009-12-04Merge branch 'mh/to_erl-error-messages' into ccase/r13b04_devErlang/OTP
* mh/to_erl-error-messages: to_erl: Include strerror(errno) in error messages OTP-8325 to_erl will now include the system error string in error messages to make it easier to understand what the real problem is. (Thanks to Magnus Henoch.)
2009-12-01erlc_SUITE: Handle new formatting of warningsBjörn Gustavsson
The MIB compiler in the snmp applications formats its warnings slightly differently, so we'll need to update the regexp that should match the expected output.
2009-11-30Merge branch 'ks/dialyzer-wx-fix' into ccase/r13b04_devErlang/OTP
* ks/dialyzer-wx-fix: dialyzer: make -wx always start the SMP emulator
2009-11-29Fix glitches when native code modules are usedBjörn Gustavsson
The erlang:make_stub_module/3 BIF (which is only used for loading native code) does not zero the word that points out an on_load routine (if any). As that word most proably will contain a non-zero value, the erlang:module_loaded/1 BIF will think that the module has an on_load routine which has not returned and will always return 'false'. That in turns causes various problems for the native code test cases.
2009-11-28to_erl: Include strerror(errno) in error messagesMagnus Henoch
to_erl likes to print the message "No running Erlang on pipe ...", no matter what the problem actually was. The wording might make you forget that you just need to run to_erl as another user, for example. With this change, to_erl will print the system error message in addition to its own. Example output: No running Erlang on pipe pipes/erlang.pipe.5: Permission denied (wrong user, wrong permissions, etc) No running Erlang on pipe pipes/erlang.pipe.5: No such device or address (this actually means "no running Erlang") No running Erlang on pipe pipes/erlang.pipe: No such file or directory (not only is there no running Erlang, there are also no pipes at all)
2009-11-28dialyzer: make -wx always start the SMP emulatorKostis Sagonas
The wx application will only work in the SMP emulator, so the -wx option for 'dialyzer' must force the -smp option when starting the emulator. Make sure that -wx in *any* position on the command line (not only as the first argument) forces the SMP emulator.
2009-11-25Update version numbersRickard Green
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP