aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
AgeCommit message (Collapse)Author
2014-03-24erts: Cleanup debug tracing in win_efile.cSverker Eriksson
2014-03-24erts: Fix file:list_dir for windows paths 258 or 259 chars longSverker Eriksson
Appending wildcard "\*" made the path too long (>= 260 chars).
2014-03-24erts: Increase MAXPATHLEN to 4096 for windowsSverker Eriksson
2014-03-24erts: Fix bug in efile_readlink for long win pathsSverker Eriksson
2014-03-24erts: Fix compiler warning in win_efile.cSverker Eriksson
and some improved debug tracing
2014-03-24erts: Make file:make_symlink/2 return {error,eperm} on WindowsSverker Eriksson
if the user has not the privilege SE_CREATE_SYMBOLIC_LINK_NAME
2014-03-23ose: Reset busy port when pdq emptyLukas Larsson
2014-03-23ose: Restore the owner of the signalAdrian Mangeac
As any scheduler process can consume any message we have to make sure that the message is owned by the scheduler before returning it in erl_drv_ose_get_signal.
2014-03-21Merge branch 'nox/reedr-closefrom'Henrik Nord
* nox/reedr-closefrom: Use closefrom(2) when available in child_setup Conflicts: erts/emulator/sys/unix/erl_child_setup.c OTP-11809
2014-03-21Merge branch 'fogfish/embedded-arm-android'Henrik Nord
* fogfish/embedded-arm-android: Raspberry PI / Android a minimal cross-compile configuration OTP-11805
2014-03-21erts: Fix heap overflow in maps:remove/2 when key is not foundSverker Eriksson
One key-value pair too many was copied.
2014-03-21Merge branch 'yiannist/hipe-llvm-backend'Henrik Nord
* yiannist/hipe-llvm-backend: Support the LLVM backend in HiPE Implement the LLVM backend Extend RTL API to support the LLVM backend Add support for llvm unique symbols in hipe_gensym Add a BIF that only returns the atom ok Move some common code in hipe_pack_constants Add better specs in hipe_pack_constants and cleanup OTP-11801
2014-03-21zlib: Fix adler32_combine/4 and crc32_combine/4Björn Gustavsson
Since our config.h is included in each source file in the zlib directory, we must make sure that config.h is also included every time zlib functions are called to ensure that definitions of types are consistent. zlib_drv.c did not include config.h, which caused problems on a MacOS X Leopard system. What happened was that HAVE_UNISTD_H was not defined when zlib.h was included. When unistd.h is not known to exist, the type z_off_t will be set to a long (32 bits on this platform). But when the zlib source files were compiled, HAVE_UNISTD_H was defined, unistd.h would be included, and z_off_t would be set to off_t (64 bits; defined in unistd.h). As a result of the mismatch, calls to the adler32_combine() and crc32_combine() would pass only 32 bits in the len2 argument when 64 bits were expected.
2014-03-21Introduce minimum allowed major driver and nif versions on loadRickard Green
2014-03-21Raspberry PI / Android a minimal cross-compile configurationDmitry Kolesnikov
Enable a cross compile Erlang/OTP platform to Android or Raspberry PI using Android NDK. Port emulator and core application to support target HW platform. Exclude any add-on services required for OTP platform deployment into target hardware due to device fragmentation and jail-break requirements. * fix erts/emulator/beam/sys.h Disable redefinition of __noreturn macro * port erts/emulator/sys/unix/erl_child_setup.c Use techniques proposed by https://code.google.com/p/erlang4android to access system properties * fix erts/emulator/sys/unix/erl_unix_sys_ddll.c The static linking of emulator cannot find dlerror(), dlopen() symbols * port erts/emulator/sys/unix/sys.c make path to shell configurable at build time * port erts/etc/common/Makefile.in disable librt for *-linux-androideabi * port erts/lib_src/pthread/ethread.c Use techniques proposed by https://code.google.com/p/erlang4android to disable emulator crash if kernel threads are on. Replace unreliable pthread_sigmask() by sigprocmask() * port lib/erl_interface/src/connect/ei_connect.c Disable call to undefined gethostid() * port lib/erl_interface/src/connect/ei_resolve.c Use gethostbyname_r() on Android platform
2014-03-20Merge branch 'vinoski/ds-enif-send'Rickard Green
* vinoski/ds-enif-send: enable enif_send to work from a dirty scheduler
2014-03-20Merge branch 'bjorn/erts/fix-lingering-tracer'Björn Gustavsson
* bjorn/erts/fix-lingering-tracer: Teach the call_time trace to notice when the trace dies (non-SMP system)
2014-03-20Teach the call_time trace to notice when the trace dies (non-SMP system)Björn Gustavsson
The call_time trace is a special kind of tracing that requires a tracer process just like ordinary call trace, but it never actually sends anything to the tracer. It merely use the existence of a trace process (and call trace flags) as an indication that call_time tracing is active for the process. If the tracer dies in a non-SMP run-time system, processes with call_time tracing would not notice that the tracer had died. Furthermore, if the set_on_spawn flag was active, the dead tracer could be propagaged to newly spawned processes. Before accumulating trace information in a non-SMP system, always validate the tracer process. (In an SMP system, a reference to a dead tracer will be cleared away each time a process is scheduled.) While we could put all of the new code beam_bp.c, we have chosen to make a function call from beam_bp.c to a function in erl_trace.c for clarity's sake and to ease further maintenance. In the future, we might want to handle tracing in more similar ways in the SMP and non-SMP system.
2014-03-19Merge branch 'cobusc/correct_comment'Henrik Nord
* cobusc/correct_comment: Fix comment that differs from code OTP-11793
2014-03-18Merge branch 'egil/maps-literals'Björn-Egil Dahlberg
* egil/maps-literals: compiler: Transform M#{} to is_map(M) dialyzer: Do not native compile modules with Maps code hipe: Properly identify map() type form terms stdlib: Test Map key linting stdlib: Accept records as Map keys stdlib: Accept Maps as Map keys stdlib: Move map type to proper definition stdlib: Properly lint map key expressions compiler: Change #c_map{var} to #c_map{arg} compiler: Constant fold Maps that are safe compiler: Validate Map src compiler: Support literal maps in cerl_clauses:match/2 compiler: Guard BIF is_map/1 is pure erts: Handle literals in is_map/1 compiler: Change Maps Core Format compiler: Create literal Maps in creation if possible
2014-03-18Merge branch 'lukas/erts/make_deps_fixes/OTP-11784'Lukas Larsson
* lukas/erts/make_deps_fixes/OTP-11784: erts: Fix resolve of generated files for depend erts: Move compiler flags generation
2014-03-17erts: Handle literals in is_map/1Björn-Egil Dahlberg
2014-03-14Merge branch 'sverk/maps-erl_interface'Sverker Eriksson
* sverk/maps-erl_interface: erts: Add distribution capability flag for maps DFLAG_MAP_TAG erts: Change external format for maps erts: Document external format for maps (MAP_EXT) erl_interface: Add test for ei_skip_term of container terms erl_interface: Add map support in ei_skip_term erl_interface: Fix mem leak in ei_decode_encode_test erl_interface: test decode/encode of maps erl_interface: Add ei encode/decode for maps erl_interface: test decode_encode of tuples and lists erl_interface: refactor ei_decode_encode_test.c
2014-03-14erts: Add distribution capability flag for maps DFLAG_MAP_TAGSverker Eriksson
This is just a preparation to allow detection of older nodes that do not understand maps (R16 and older).
2014-03-14erts: Change external format for mapsSverker Eriksson
to be: 116,Arity, K1,V1,K2,V2,...,Kn,Vn instead of: 116,Arity, K1,K2,...,Kn, V1,V2,....,Vn We think this will be better for future internal map structures like HAMT. Would be bad if we need to iterate twice over HAMT in term_to_binary, one for keys and one for values.
2014-03-13Merge branch 'sverk/valgrind-leaks'Sverker Eriksson
* sverk/valgrind-leaks: erts: Suppress false leak in hipe_thread_signal_init erts: Fix leak in nif_SUITE:resource_takeover (again)
2014-03-13erts: Revert file:set_cwd impl for windowsSverker Eriksson
No need to even try as CWD can not bee a long path anyway.
2014-03-13erts: Ignore reduntant slashes in windows pathsSverker Eriksson
2014-03-13erts: Fix long windows paths for compressed filesSverker Eriksson
2014-03-13erts: Use GetFullPathNameW to construct abs paths from relative onesSverker Eriksson
2014-03-13erts: Fix file driver to handle long paths on windowsSverker Eriksson
2014-03-12Pass full strings to DTrace probesMichal Ptaszek
Whenever string is passed as an argument to a DTrace probe, its length should be properly computed. Until now in order to get length of the input buffer size_of(char *) was used - which evalutes to 4 or 8 (depending on the architecture). To get a proper length, size_of(DTRACE_CHARBUF_NAME(buffer_name)) should be used.
2014-03-10enable enif_send to work from a dirty schedulerSteve Vinoski
2014-03-09Use closefrom(2) when available in child_setupRick Reed
2014-03-09Remove a superfluous echo in the emulator MakefileAnthony Ramine
It pollutes the output of silent rules.
2014-03-07Add a BIF that only returns the atom okYiannis Tsiouris
A call in llvm_fix_pinned_regs/0 is inserted in the beginning of LLVM unwind blocks (i.e. code executed when an LLVM 'invoke' call triggers an exception) in order to get the BP and SP registers right. This is needed because LLVM exception handling doesn't provide the return value (that also contains the values for these registers, as defined in the HiPE Calling Convention for LLVM) on the 'landingpad's.
2014-03-05Fix comment that differs from codeCobus Carstens
The comment in the code state that the tree is traversed to the left, when in fact it is traversed to the right.
2014-03-04Merge branch 'bjorn/hipe/fix-race-condition'Björn Gustavsson
* bjorn/hipe/fix-race-condition: Delay patching of closures to eliminate a race condition hipe: Break apart hipe_bif:make_fe/3 into two BIFs
2014-02-28erts: Suppress false leak in hipe_thread_signal_initSverker Eriksson
2014-02-28erts: Fix leak in nif_SUITE:resource_takeover (again)Sverker Eriksson
2014-02-28hipe: Break apart hipe_bif:make_fe/3 into two BIFsBjörn Gustavsson
This commit is a preparation for eliminating a race condition loading the native code for modules whose BEAM code has already been loaded. Here we introduce two new BIFs so that looking up a fun entry is separate from setting the native address in the fun entry.
2014-02-27erts: Fix Map cmp exact equal of an empty mapBjörn-Egil Dahlberg
The expression, #{} =:= M where M was any Map, would always result in 'true'. This commit fixes this issue by first comparing sizes for both terms and then checking for size zero.
2014-02-25Merge branch 'sverk/hipe-disable-gc-bug'Sverker Eriksson
* sverk/hipe-disable-gc-bug: erts: Fix heap overwrite by hipe "trap frames" when GC is disabled ASSERT that GC is not tried with "need" when GC is disabled
2014-02-25erts: Fix heap overwrite by hipe "trap frames" when GC is disabledSverker Eriksson
by trapping BIFs like term_to_binary and binary_to_term.
2014-02-24Merge branch 'lukas/erts/float_encoding/OTP-11738'Lukas Larsson
* lukas/erts/float_encoding/OTP-11738: erts: Set default external enc to use new float scheme
2014-02-24Merge branch 'lukas/ose/master/OTP-11334'Lukas Larsson
* lukas/ose/master/OTP-11334: (71 commits) erts: Fix unix efile assert ose: Use -O2 when building ose: Expand OSE docs ose: Add dummy ttsl driver ose: Cleanup cleanup of mutex selection defines ose: Polish mmap configure checks ose: Add ose specific x-compile flags ose: Updating fd_driver and spawn_driver for OSE ose: Updating event and signal API for OSE ose: Cleanup of mutex selection defines win32: Compile erl_log.exe ose: Remove uneccesary define ose: Fix ssl configure test for osx erts: Fix sys_msg_dispatcher assert ose: Fix broken doc links ose: Thread priorities configurable from lmconf ose: Yielding the cpu is done "the OSE" way ose: Start using ppdata for tse key ose: Do not use spinlocks on OSE ose: Fix support for crypto ... Conflicts: lib/crypto/c_src/crypto.c
2014-02-24erts: Fix unix efile assertLukas Larsson
If writev return an error (eg ENOSPC) we do not want to abort here but instead propagate upwards into erlang.
2014-02-24ose: Add dummy ttsl driverLukas Larsson
2014-02-24ose: Updating fd_driver and spawn_driver for OSEJonas Karlsson
2014-02-24ose: Updating event and signal API for OSEJonas Karlsson