aboutsummaryrefslogtreecommitdiffstats
path: root/erts
AgeCommit message (Collapse)Author
2010-11-12Merge branch 'raimo/inet-getifaddrs/OTP-8926' into devRaimo Niskanen
* raimo/inet-getifaddrs/OTP-8926: Write documentation Delete decommented code Add testcase Implement inet:getifaddrs/0 on Windows Implement basic inet:getifaddrs/0 Fix building error of SCTP in FreeBSD 7.1 and later
2010-11-10Fix erts_schedule_misc_op() so it can be called from arbitrary threadsRickard Green
Tracing to port could cause an emulator crash when unloading the trace driver.
2010-11-09Merge branch 'sverker/doc-fixes/OTP-8880' into devSverker Eriksson
* sverker/doc-fixes/OTP-8880: Documentation update to ETS and drivers
2010-11-09init: Fix two erroneous specsKostis Sagonas
While at it, introduced a state() type and used it in some place.
2010-11-09Delete decommented codeRaimo Niskanen
2010-11-09Implement inet:getifaddrs/0 on WindowsRaimo Niskanen
2010-11-09Implement basic inet:getifaddrs/0Raimo Niskanen
2010-11-09Fix building error of SCTP in FreeBSD 7.1 and laterKenji Rikitake
This patch fixes building error of SCTP in FreeBSD 7.1 and later. See http://www.erlang.org/cgi-bin/ezmlm-cgi?2:mss:1257:200904:hppnfialjjdlgecdiehe for the details. R13A patch for solving a compilation error when building erts/emulator/drivers/common/inet_drv.c by Kenji Rikitake 12-APR-2009 Symptom solved by this patch: When building R13A in FreeBSD 7.1-RELEASE, the compiler flag HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY is NOT enabled. Some code in erts/emulator/drivers/common/inet_drv.c incorrectly assumes HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY is always true when HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_FLAGS is true in config.h. This assumption causes a compilation error.
2010-11-02Be less eager to set dist entry in busy stateRickard Green
The runtime system is now less eager to suspend processes sending messages over the distribution. The default value of the distribution buffer busy limit has also been increased from 128 KB to 1 MB. This in order to improve throughput.
2010-11-02Merge branch 'sf/erts_de_busy_limit' into devRickard Green
* sf/erts_de_busy_limit: Add flag-based setting for the distribution buffer busy limit
2010-11-02Add flag-based setting for the distribution buffer busy limitScott Lystig Fritchie
Id: OTP-8912 This patch creates a new family of flags with the "+z" prefix. It further creates a new configuration option called "dbbl" (which is the first letter of the name dist_buf_busy_limit). Example usage of this flag would be "+zdbbl 1048576". This patch creates an adjustable buffer limit for the amount of data that may be buffered by the erlang distribution code (in dist.c specifically). Before this patch, this hard-coded constant was used: #define ERTS_DE_BUSY_LIMIT (128*1024) When large binaries are transmitted between nodes (or simply a lot of medium-sized binaries), it is very easy to hit the old 128KB limit. Processes that use the erlang:system_monitor() BIF to monitor system events can be spammed by {monitor, busy_dist_port, ...} message tuples at rates of tens to even hundreds of messages/second. A larger buffer limit will allow processes to buffer more outgoing messages over the distribution. When the buffer limit has been reached, sending processes will be suspended until the buffer size has shrunk. The buffer limit is per distribution channel. A higher limit will give lower latency and higher throughput at the expense of higher memory usage. A variation of this patch has been in commercial production use in at least two companies that the author is aware of. Larger buffer values can reduce the number of {monitor, busy_dist_port, ...} system messages drastically, lower overall messaging latencies, and prevent false timeouts and 'nodedown' messages in extremely busy Mnesia systems. Test suite: there are two tests: a. In erlexec_SUITE.erl to test basic set & get of the value b. In distribution_SUITE.erl, to verify that setting +zdbbl very low will actually change behavior.
2010-10-29Allow usage of libatomic_ops when other compilers than gcc are usedRickard Green
2010-10-29Add pre pentium 4 compatibilty configure testRickard Green
2010-10-29ethread: do not return from void ethr_atomic_set_relbTuncer Ayaz
Reported-by: Patrick Baggett <[email protected]>
2010-10-27Fix ERL_DRV_INT and ERL_DRV_UINT in halfword emulatorRickard Green
2010-10-21Merge branch 'maint-r14' into devBjörn Gustavsson
* maint-r14: Prepare release Fix that the documentation top index generator can handle an Ericsson internal application group Teach -init_debug to print info about on_load handlers begin run Fix hang in on_load handlers in embedded mode Conflicts: erts/vsn.mk lib/kernel/vsn.mk
2010-10-21Prepare releaseErlang/OTP
2010-10-20Teach -init_debug to print info about on_load handlers begin runBjörn Gustavsson
2010-10-20Fix hang in on_load handlers in embedded modeBjörn Gustavsson
In embedded mode, all on_load handlers will be called after loading all modules but before starting any servers. Therefore, if an on_load handler calls any function in the code module that calls the code server (such as code:priv_dir/1), there will be a deadlock because the code server has not yet been started. Fix this problem by invoking the on_load handlers after having started most servers in the kernel application.
2010-10-14Add Win32 support for hard and symbolic file system linksBlaine Whittle
Hard linking requires XP or later and a NTFS formatted drive. Symbolic linking requires Windows Vista, Windows Server 2008, Windows 7 or later. Symbolic linking on earlier versions of Windows will return {error, enotsup}. file:make_link/2, file:make_sym_link/2 and file:read_link/1 are all implemented. file:read_file_info/1 does NOT return the number of hard links on the file as this results in performance problems for read_file_info/1, however this can be enabled by uncommenting a few lines of code. The original path was submitted on 9/2/2009 by Alex Tearse-Doyle.
2010-10-14Merge branch 'ms/security-fixes' into devBjörn Gustavsson
* ms/security-fixes: erlc: remove unused variable typer: prevent buffer overflows run_test: prevent buffer overflow heart: prevent buffer overflow escript: prevent buffer overflows erlexec: prevent buffer overflows erlc: prevent buffer overflows dialyzer: prevent buffer overflows OTP-8892
2010-10-13Update hint where to find epmd protocol spec in epmd_srv.c.Ralf Doering
With newer releases erts/emulator/internal_doc/erl_ext_dist.txt just forwards the reader to the ERTS User's Guide. Adjust the comment in epmd_srv.c to point to this location too. Signed-off-by: Ralf Doering <[email protected]>
2010-10-12Fix erl_drv_tsd_get() and enif_tsd_get()Rickard Green
A bug in erl_drv_tsd_get() and enif_tsd_get() could cause an emulator crash. These functions are currently not used in OTP. That is, the crash only occur on systems with user implemented NIF libraries or drivers that use one of these functions.
2010-10-08Merge branch 'pan/cerl-gdb-emacs/OTP-8882' into devPatrik Nyblom
* pan/cerl-gdb-emacs/OTP-8882: Incorporate Michael Santos patch for cerl and gdb via emacs
2010-10-08Merge branch 'rickard/halfword-bug' into devRickard Green
* rickard/halfword-bug: Fix newly introduced halfword emulator bugs
2010-10-07Merge branch 'maint-r14' into devPatrik Nyblom
Conflicts: erts/vsn.mk
2010-10-07Incorporate Michael Santos patch for cerl and gdb via emacsPatrik Nyblom
Michael Santos supplied a very nice patch that did set the annotation level correctly for gdb when run from cerl in emacs. The patch adds --annotate=3 to the gdb command line, which makes emacs parse the gdb output correctly, making the right source code be loaded in the emacs buffer. While integrating it, I removed my faulty code trying to do the same with hacky elisp commands. Michaels way is the right way to do it. Thanks!
2010-10-07Fix newly introduced halfword emulator bugsRickard Green
2010-10-06Added win32 large address aware link optionBlaine Whittle
This link option just sets a flag in the binary and doesn't change OS compatibility. This allows the Erlang VM to use up to 3 gigs of address space instead of the default of 2 gigs.
2010-10-06Documentation update to ETS and driversSverker Eriksson
State more clearly that ETS functions will throw badarg if calling process lacks access right. And that driver stop callback should free memory allocted by start.
2010-10-05Prepare releaseErlang/OTP
2010-10-04Merge branch 'rt/solaris-pty-handling-fixes' into devBjörn Gustavsson
* rt/solaris-pty-handling-fixes: Add corrected support for Solaris PTYs to run_erl Fix a typo that leads to syntax errors with DEBUG defined in run_erl OTP-8878
2010-10-04Merge branch 'mp/fix-hipe-write' into devBjörn Gustavsson
* mp/fix-hipe-write: fix 64-bit writes to 32-bit struct field in HiPE runtime OTP-8877
2010-10-04erlc: remove unused variableMichael Santos
2010-10-04typer: prevent buffer overflowsMichael Santos
2010-10-04run_test: prevent buffer overflowMichael Santos
Truncate buffers used to hold command line arguments.
2010-10-04heart: prevent buffer overflowMichael Santos
2010-10-04escript: prevent buffer overflowsMichael Santos
Check buffer operations on input from escripts, the command line and environment variables.
2010-10-04erlexec: prevent buffer overflowsMichael Santos
Truncate buffer operations on environment variables.
2010-10-04erlc: prevent buffer overflowsMichael Santos
Check buffer operations and increase the size of the buffer used for holding command line arguments, since the "-D" switch will be expanded into 3 arguments when passed to erl.
2010-10-04dialyzer: prevent buffer overflowsMichael Santos
Check length of buffers used with environment variables and debug messages.
2010-10-02Fix crash with erlang:system_info({cpu_topology,junk})Paul Guyot
There is a bug in system_info BIF causing a crash if erts_get_cpu_topology_term fails. The fix comes with a non-regression test.
2010-10-01Teach read_topology not to crash on W2K3Patrik Nyblom
2010-10-01emulator Makefile: Add missing dependencyBjörn Gustavsson
Make sure that an update to erts/emulator/tools/make_tables will force all generated files to be re-generated.
2010-09-30Fix appending to large files (>4GB) on WindowsJuhani Rankimies
Append mode doesn't work for files larger that 4GB on Windows. Caused by incorrect usage of SetFilePointer in win_efile.c. Fix uses OVERLAPPED structure to specify write position (EOF). http://msdn.microsoft.com/en-us/library/aa365747.aspx Opening file in append mode was also considered, but rejected, because it might cause backwards incompatibility by limiting applicable operations on the descriptor. SetFilePointerEx was not used because it would caused more system calls than using OVERLAPPED structure.
2010-09-30Fix a bug in the ERTS_BIF_PREP_TRAPx() macrosBjörn Gustavsson
It seems to work (at least on a little-endian architecture) by sheer luck.
2010-09-30fix 64-bit writes to 32-bit struct field in HiPE runtimeMikael Pettersson
In the HiPE part of the runtime system's Process struct there is a state field which is 32 bits wide even on 64-bit machines. There is a single instruction in the HiPE AMD64 runtime where this field is incorrectly written with a 64-bit store. Luckily the extraneous 32 bits are written as zeros to 4 bytes of tail-padding at the end of the struct, so nothing should have broken because of this. The same bug exists in the HiPE PowerPC64 runtime (in development), but on the big-endian PPC64 the effect is to write the actual value to the tail-padding and zero to the struct field, which potentially breaks TRAPs from BIFs (depending on BIF arities and how many parameter registers the runtime has been configured to use). Thanks to Paul Guyot for noticing the oversized write on AMD64.
2010-09-29Add corrected support for Solaris PTYs to run_erlRyan Tilder
Two related but slightly separate issues: run_erl doesn't support Solaris's /dev/ptmx device and run_erl didn't load the necessary STREAMS modules so that to_erl can provide terminal echo of keyboard input. This patch adds ifdef'd support for Solaris and derivatives to open /dev/ptmx directly since adding the C99 defines to CFLAGS breaks all kinds of other things in the build. It also adds ifdef'd ioctl calls to load the necessary STREAMS modules to permit termios to work.
2010-09-29Fix a typo that leads to syntax errors with DEBUG defined in run_erlRyan Tilder
While attempting to debug odd terminal echo issues on Solaris, I noticed that run_erl.c will fail to compile due to a typo causing a syntax error.
2010-09-24Remove stray use of _VOID_Björn Gustavsson
In a70159b33f20a26b2674d7cf777617c5f0261a5c, the _VOID_ macro was eliminated, but one use of it inside an "#ifdef DEBUG" was forgotten.