diff options
Diffstat (limited to 'erts')
-rw-r--r-- | erts/configure.in | 20 | ||||
-rw-r--r-- | erts/doc/src/erl.xml | 2 | ||||
-rw-r--r-- | erts/doc/src/escript.xml | 11 | ||||
-rw-r--r-- | erts/doc/src/notes.xml | 329 | ||||
-rw-r--r-- | erts/emulator/Makefile.in | 6 | ||||
-rw-r--r-- | erts/emulator/beam/big.c | 10 | ||||
-rw-r--r-- | erts/emulator/beam/erl_process.c | 2 | ||||
-rw-r--r-- | erts/emulator/beam/erl_unicode.c | 2 | ||||
-rw-r--r-- | erts/emulator/beam/io.c | 8 | ||||
-rw-r--r-- | erts/emulator/beam/utils.c | 34 | ||||
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 10 | ||||
-rw-r--r-- | erts/emulator/drivers/common/erl_efile.h | 16 | ||||
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 6 | ||||
-rw-r--r-- | erts/emulator/drivers/common/zlib_drv.c | 2 | ||||
-rw-r--r-- | erts/emulator/drivers/unix/unix_efile.c | 2 | ||||
-rw-r--r-- | erts/emulator/hipe/hipe_native_bif.c | 4 | ||||
-rw-r--r-- | erts/emulator/hipe/hipe_x86_gc.h | 2 | ||||
-rw-r--r-- | erts/emulator/pcre/pcre_exec.c | 2 | ||||
-rw-r--r-- | erts/emulator/sys/common/erl_mseg.c | 14 | ||||
-rw-r--r-- | erts/emulator/sys/unix/sys_float.c | 10 | ||||
-rw-r--r-- | erts/vsn.mk | 4 |
21 files changed, 421 insertions, 75 deletions
diff --git a/erts/configure.in b/erts/configure.in index 7257751068..2ee907b6e4 100644 --- a/erts/configure.in +++ b/erts/configure.in @@ -1082,8 +1082,26 @@ fi AC_SUBST(ERTS_BUILD_SMP_EMU) -AC_CHECK_FUNCS([posix_fadvise, fallocate]) +AC_CHECK_FUNCS([posix_fadvise]) AC_CHECK_HEADERS([linux/falloc.h]) +dnl * Old glibcs have broken fallocate64(). Make sure not to use it. +AC_CACHE_CHECK([whether fallocate() works],i_cv_fallocate_works,[ + AC_TRY_LINK([ + #include <stdio.h> + #include <stdlib.h> + #include <fcntl.h> + #include <unistd.h> + #include <fcntl.h> + #include <linux/falloc.h> + ], + [ + int fd = creat("conftest.temp", 0600); + fallocate(fd, FALLOC_FL_KEEP_SIZE,(off_t) 1024,(off_t) 1024); + ], i_cv_fallocate_works=yes, i_cv_fallocate_works=no) +]) +if test $i_cv_fallocate_works = yes; then + AC_DEFINE(HAVE_FALLOCATE, 1, Define if you have a working fallocate()) +fi dnl * Old glibcs have broken posix_fallocate(). Make sure not to use it. dnl * It may also be broken in AIX. diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index bb81330fec..622b40a80a 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -615,7 +615,7 @@ debugging.</item> </taglist> </item> - <tag><marker id="+pc"/><marker id="max_processes"><c><![CDATA[+pc Range]]></c></marker></tag> + <tag><marker id="+pc"/><marker id="printable_character_range"><c><![CDATA[+pc Range]]></c></marker></tag> <item> <p>Sets the range of characters that the system will consider printable in heuristic detection of strings. This typically affects the shell, debugger and io:format functions (when ~tp is used in the format string).</p> <p>Currently two values for the <c>Range</c> are supported: diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml index 66e904f64f..9e2a87dde6 100644 --- a/erts/doc/src/escript.xml +++ b/erts/doc/src/escript.xml @@ -4,7 +4,7 @@ <comref> <header> <copyright> - <year>2007</year><year>2011</year> + <year>2007</year><year>2013</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -85,6 +85,11 @@ $ <input>escript factorial 5</input> </pre> enter the major mode for editing Erlang source files. If the directive is present it must be located on the second line.</p> + + <p>If there is a comment selecting the <seealso + marker="stdlib:epp#encoding">encoding</seealso> it can be + located on the second line.</p> + <p>On the third line (or second line depending on the presence of the Emacs directive), it is possible to give arguments to the emulator, such as </p> @@ -133,7 +138,9 @@ halt(1).</pre> <pre> -include_lib("kernel/include/file.hrl").</pre> <p>to include the record definitions for the records used by the - <c>file:read_link_info/1</c> function.</p> + <c>file:read_link_info/1</c> function. You can also select + encoding here, but if there is a valid encoding comment on + the second line it takes precedence.</p> <p>The script will be checked for syntactic and semantic correctness before being run. If there are warnings (such as diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 0363f0237e..7fc61517a8 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -30,6 +30,335 @@ </header> <p>This document describes the changes made to the ERTS application.</p> +<section><title>Erts 5.10.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Threads created internally in the runtime system by + vanilla, fd, and spawn drivers on Windows systems could + make thread unsafe calls to <c>driver_select()</c>.</p> + <p> + Own Id: OTP-10802</p> + </item> + <item> + <p> + Threads created internally in the runtime system by the + vanilla, fd, and spawn drivers on Windows systems could + make unsafe memory accesses to driver data after port had + terminated.</p> + <p> + Own Id: OTP-10803</p> + </item> + <item> + <p> + The runtime system could crash when flushing data to + standard out or standard error on Windows.</p> + <p> + Own Id: OTP-10807</p> + </item> + <item> + <p>Bugs due to the port optimizations introduced in + erts-5.10/OTP-R16A have been fixed:</p> <list> + <item>Memory leak when terminating ports</item> + <item>Memory leak when reaching the system limit of + maximum amount of concurrently existing ports</item> + <item>Crashs due to missing, or late test of bad port + handle</item> <item>The newly introduced driver API + function <c>erl_drv_busy_msgq_limits()</c> could not be + used by dynamically linked in drivers on Windows</item> + </list> + <p> + Own Id: OTP-10809 Aux Id: OTP-10336 </p> + </item> + <item> + <p> + Fix <c>{packet,httph}</c> header capitalization for + unrecognized header fields longer than 20 charachters + such as <c>Sec-Websocket-Version</c>. The limit is simply + raised from 20 to 50 characters with the hope that valid + headers longer than 50 are not used.</p> + <p> + Own Id: OTP-10824</p> + </item> + <item> + <p> + Fix rounding issues in float_to_list/1,2. Thanks to Serge + Aleynikov</p> + <p> + Own Id: OTP-10837</p> + </item> + <item> + <p> + Fix memory leak in file driver introduced in R16A.</p> + <p> + Own Id: OTP-10841</p> + </item> + <item> + <p>A bug in an ERTS internal queue implementation could + cause the loss of a wake up signal to a consumer thread. + This has now been fixed.</p> + <p>The effect of this bug, when triggered, was often only + a small or even no delay of certain operations. This + since, threads often are woken due to other unrelated + reasons. However, if the consumer thread was not woken + due to other reasons when the bug was triggered, these + operations could be left hanging, potentially for ever. + Such effects seems to have been very rare, but we have on + at least one occasion gotten a report about such an + issue.</p> + <p>Operations potentially effected by this bug:</p> + <taglist> <tag>Inspection of memory allocation + status</tag> <item>The Erlang process calling + <c>erlang:memory/[0,1]</c>, or + <c>erlang:system_info({allocator|allocator_sizes, _})</c> + could potentially hang waiting for responses from + involved threads.</item> <tag>Async thread pool + jobs</tag> <item>An async thread pool job request and/or + reply could potentially be left hanging. In OTP this only + effected file operations, but user implemented drivers + using the async thread pool were also effected. In the + file operation case, this would typically translate into + an Erlang process potentially hanging on the file + operation.</item> <tag>Shutting down the runtime + system</tag> <item>Due to the issue with the async thread + pool mentioned above, flushing of I/O while terminating + the runtime system could also potentially hang.</item> + <tag>ETS memory deallocation</tag> <item>Scheduled jobs + handling deallocation of the main structure of an ETS + table could potentially hang. This more or less only + translates into minor memory leaks.</item> <tag>Shutting + down distribution</tag> <item>The distribution shutdown + phase used when manually shutting down the distribution, + i.e., when calling <c>net_kernel:stop()</c>, could + potentially hang.</item> </taglist> + <p> + Own Id: OTP-10854</p> + </item> + <item> + <p> + OS X Snow Leopard now only uses write, as writev does not + work properly on very large files.</p> + <p> + Own Id: OTP-10858</p> + </item> + <item> + <p> + Fixed a bug where line oriented file I/O using read_ahead + was very slow for files with very large difference in + line length.</p> + <p> + Own Id: OTP-10859</p> + </item> + <item> + <p> + In erts-5.10 (R16A) faulty hashvalues were produced for + non-ASCII atoms (characters in byte-range 128..255). This + has now been fixed and hashvalues conforms to previous + OTP releases.</p> + <p> + Own Id: OTP-10860</p> + </item> + <item> + <p> + Fixes of memory accesses that might be thread unsafe when + the runtime system has been linked against third-party + libraries for atomic memory operations during the build. + Most builds are uneffected by this bug. If triggered, the + runtime system will most likely crash more or less + immediately.</p> + <p> + Own Id: OTP-10875 Aux Id: OTP-10854 </p> + </item> + <item> + <p> + Fixed a bug where it was longer possible to give the +sws + proposal flag to non-smp emulators.</p> + <p> + Own Id: OTP-10881 Aux Id: seq12258 </p> + </item> + <item> + <p> + Faulty type to bytes read for ReadFile on Windows. This + could cause windows systems to misbehave. The correct + type is now used.</p> + <p> + Own Id: OTP-10890</p> + </item> + <item> + <p> + Change default max ports for Windows to 8192. Having a + too large value caused Windows to not be able to recover + properly. If you want to use another value, pass <c>+Q + Value</c> to erl or werl.</p> + <p> + Own Id: OTP-10892</p> + </item> + <item> + <p> + Fix rare crash on halfword vm during code loading.</p> + <p> + Own Id: OTP-10896</p> + </item> + </list> + </section> + + + <section><title>Improvements and New Features</title> + <list> + <item> + <p> + Tuple funs (deprecated in R15B) are no longer supported.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-10170</p> + </item> + <item> + <p> + Added four new bifs, <c>erlang:binary_to_integer/1,2</c>, + <c>erlang:integer_to_binary/1</c>, + <c>erlang:binary_to_float/1</c> and + <c>erlang:float_to_binary/1,2</c>. These bifs work + similarly to how their list counterparts work, except + they operate on binaries. In most cases converting from + and to binaries is faster than converting from and to + lists. </p> + <p> + These bifs are auto-imported into erlang source files and + can therefore be used without the <c>erlang</c> prefix.</p> + <p> + Own Id: OTP-10300 Aux Id: kunagi-74 [74] </p> + </item> + <item> + <p> + The experimental support for packages has been removed.</p> + <p> + Own Id: OTP-10348 Aux Id: kunagi-316 [227] </p> + </item> + <item> + <p>The driver API function <seealso + marker="erl_driver#erl_drv_consume_timeslice"><c>erl_drv_consume_timeslice()</c></seealso>, + and the NIF API function <seealso + marker="erl_nif#enif_consume_timeslice"><c>enif_consume_timeslice()</c></seealso> + have been introduced.</p> + <p>These functions are provided in order to better + support co-operative scheduling, improve system + responsiveness, and to make it easier to prevent + misbehaviors of the VM due to a process or port + monopolizing a scheduler thread. They can be used when + dividing lengthy work into a number of repeated calls + without the need to use threads.</p> + <p> + Own Id: OTP-10810</p> + </item> + <item> + <p> + The list_to_integer/2 bif has been optimized when used + with bases other than 10.</p> + <p> + Own Id: OTP-10834 Aux Id: kunagi-74 [74] </p> + </item> + <item> + <p> + The git commit sha of the HEAD commit is now added to the + Erlang shell when compiling a non-released Erlang + version.</p> + <p> + Own Id: OTP-10838</p> + </item> + <item> + <p>Change caching policy for memory segment allocator. + For instance, prefer sbc segments over mbc segments, + caching policy is time-arrow aware, evicting older cached + segments to store newer segments. </p> <p>The default + number of cachable segment has been increased from five + to ten segments. This can be modified, same as before, + with the command line option <c>+MMmcs 5</c></p> + <p>Impact: Increased speed for processing on larger + objects, e.g. binaries. Slight increase of mapped and + resident memory. Tune your system with memory options to + <c>erl</c> for best performance.</p> + <p> + Own Id: OTP-10840</p> + </item> + <item> + <p> + Updated config.sub and config.guess to latest version + from gnu.org</p> + <p> + Own Id: OTP-10848</p> + </item> + <item> + <p> + Add an xcomp file for Blue Gene/Q. Thanks to Kostis + Sagonas.</p> + <p> + Own Id: OTP-10849</p> + </item> + <item> + <p> + Cleanup of documentation of the type language. Thanks to + Kostis Sagonas.</p> + <p> + Own Id: OTP-10850</p> + </item> + <item> + <p> + Change the return value of hipe_bifs:remove_refs_from/1. + Thanks to Kostis Sagonas.</p> + <p> + Own Id: OTP-10851</p> + </item> + <item> + <p> + As of ERTS-5.10/OTP-R16A node names passed in the EPMD + protocol are required to be encoded in UTF-8. Since EPMD + previously accepted latin1 encoded node names this is an + incompatibility. However, since Erlang nodes always have + required characters in node names to be 7-bit ASCII + characters (and still do require this), this + incompatibility should not effect anyone using EPMD as an + Erlang Port Mapper Daemon.</p> + <p> + *** POTENTIAL INCOMPATIBILITY ***</p> + <p> + Own Id: OTP-10872 Aux Id: OTP-10753 </p> + </item> + <item> + <p> + The +pc flag to erl can be used to set the range of + characters considered printable. This affects how the + shell and io:format("~tp",...) functionality does + heuristic string detection. More can be read in STDLIB + users guide.</p> + <p> + Own Id: OTP-10884</p> + </item> + <item> + <p> + Fix a number of type cast errors related to formatted + printing on Win64 that can potentially cause problem when + the Erlang VM exceeds 4 GB of ram. (Thanks to Blaine + Whittle for the original patch)</p> + <p> + Own Id: OTP-10887</p> + </item> + <item> + <p> + The effect of the deprecated environment variable + ERL_MAX_PORTS had been removed premeturely. It has now + been readded. Note that this is still scheduled to be + released in R17B.</p> + <p> + Own Id: OTP-10895</p> + </item> + </list> + </section> + +</section> + <section><title>Erts 5.10</title> <section><title>Fixed Bugs and Malfunctions</title> diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in index 133ecd69e4..4f2f647742 100644 --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in @@ -476,8 +476,10 @@ endif ifdef DTRACE_ENABLED # global.h causes problems by including dtrace-wrapper.h which includes # the autogenerated erlang_dtrace.h ... so make erlang_dtrace.h very early. -generate: $(TARGET)/erlang_dtrace.h $(GENERATE) +DTRACE_HEADERS = $(TARGET)/erlang_dtrace.h +generate: $(DTRACE_HEADERS) $(GENERATE) else +DTRACE_HEADERS = generate: $(GENERATE) endif @@ -863,7 +865,7 @@ $(OBJDIR)/%.o: hipe/%.c $(BINDIR)/hipe_mkliterals$(TF_MARKER): $(OBJDIR)/hipe_mkliterals.o $(ld_verbose)$(CC) $(CFLAGS) $(INCLUDES) -o $@ $< -$(OBJDIR)/hipe_mkliterals.o: $(HIPE_ASM) $(TTF_DIR)/erl_alloc_types.h \ +$(OBJDIR)/hipe_mkliterals.o: $(HIPE_ASM) $(TTF_DIR)/erl_alloc_types.h $(DTRACE_HEADERS) \ $(TTF_DIR)/OPCODES-GENERATED $(TARGET)/TABLES-GENERATED $(TTF_DIR)/hipe_literals.h: $(BINDIR)/hipe_mkliterals$(TF_MARKER) diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c index acfcc845e4..9260c0c4b8 100644 --- a/erts/emulator/beam/big.c +++ b/erts/emulator/beam/big.c @@ -150,14 +150,14 @@ #define D2GTE(a1,a0,b1,b0) (!D2LT(a1,a0,b1,b0)) #define D2LTE(a1,a0,b1,b0) (!D2GT(a1,a0,b1,b0)) -// Add (A+B), A=(a1B+a0) B=(b1B+b0) +/* Add (A+B), A=(a1B+a0) B=(b1B+b0) */ #define D2ADD(a1,a0,b1,b0,c1,c0) do { \ ErtsDigit __ci = 0; \ DSUM(a0,b0,__ci,c0); \ DSUMc(a1,b1,__ci,c1); \ } while(0) -// Subtract (A-B), A=(a1B+a0), B=(b1B+b0) (A>=B) +/* Subtract (A-B), A=(a1B+a0), B=(b1B+b0) (A>=B) */ #define D2SUB(a1,a0,b1,b0,c1,c0) do { \ ErtsDigit __bi; \ DSUB(a0,b0,__bi,c0); \ @@ -1337,7 +1337,7 @@ static dsize_t I_lshift(ErtsDigit* x, dsize_t xl, Sint y, while(bw--) *r++ = 0; - if (sw) { // NOTE! x >> 32 is not = 0! + if (sw) { /* NOTE! x >> 32 is not = 0! */ while(xl--) { a0 = (*x << sw) | a1; a1 = (*x >> (D_EXP - sw)); @@ -1384,7 +1384,7 @@ static dsize_t I_lshift(ErtsDigit* x, dsize_t xl, Sint y, x += (xl-1); r += (rl-1); xl -= bw; - if (sw) { // NOTE! x >> 32 is not = 0! + if (sw) { /* NOTE! x >> 32 is not = 0! */ while(xl--) { a1 = (*x >> sw) | a0; a0 = (*x << (D_EXP-sw)); @@ -2468,7 +2468,7 @@ int term_equals_2pow32(Eterm x) if (!is_big(x)) return 0; bp = big_val(x); -#if D_EXP == 16 // 16 bit platfrom not really supported!!! +#if D_EXP == 16 /* 16 bit platfrom not really supported!!! */ return (BIG_SIZE(bp) == 3) && !BIG_DIGIT(bp,0) && !BIG_DIGIT(bp,1) && BIG_DIGIT(bp,2) == 1; #elif D_EXP == 32 diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 00247b387a..16b6b1c79d 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -1811,7 +1811,7 @@ erts_set_aux_work_timeout(int ix, erts_aint32_t type, int enable) ERTS_DBG_CHK_AUX_WORK_VAL(type); ERTS_DBG_CHK_AUX_WORK_VAL(erts_atomic32_read_nob(&aux_work_tmo->type[ix])); -// erts_fprintf(stderr, "t(%d, 0x%x, %d)\n", ix, type, enable); + /* erts_fprintf(stderr, "t(%d, 0x%x, %d)\n", ix, type, enable); */ if (!enable) { old = erts_atomic32_read_band_mb(&aux_work_tmo->type[ix], ~type); diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c index fa53fd0937..ad6f8b993a 100644 --- a/erts/emulator/beam/erl_unicode.c +++ b/erts/emulator/beam/erl_unicode.c @@ -724,7 +724,7 @@ L_Again: /* Restart with sublist, old listend was pushed on stack */ hp = HAlloc(p, 2); obj = CDR(objp); ioterm = CONS(hp, rest_term, obj); - //(*left) = 0; + /* (*left) = 0; */ goto done; } if (rest_term != NIL) { diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 8c67f731f4..a9771de7ad 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -5960,7 +5960,7 @@ int driver_outputv(ErlDrvPort ix, char* hbuf, ErlDrvSizeT hlen, binv++; n--; } else { - iov->iov_base += skip; + iov->iov_base = ((char *)(iov->iov_base)) + skip; iov->iov_len -= skip; skip = 0; } @@ -6405,7 +6405,7 @@ int driver_enqv(ErlDrvPort ix, ErlIOVec* vec, ErlDrvSizeT skip) n--; } else { - iov->iov_base += skip; + iov->iov_base = ((char *)(iov->iov_base)) + skip; iov->iov_len -= skip; skip = 0; } @@ -6470,7 +6470,7 @@ int driver_pushqv(ErlDrvPort ix, ErlIOVec* vec, ErlDrvSizeT skip) n--; } else { - iov->iov_base += skip; + iov->iov_base = ((char *)(iov->iov_base)) + skip; iov->iov_len -= skip; skip = 0; } @@ -6529,7 +6529,7 @@ ErlDrvSizeT driver_deq(ErlDrvPort ix, ErlDrvSizeT size) q->v_head++; } else { - q->v_head->iov_base += size; + q->v_head->iov_base = ((char *)(q->v_head->iov_base)) + size; q->v_head->iov_len -= size; size = 0; } diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c index a8f15fdc38..d5d97d748a 100644 --- a/erts/emulator/beam/utils.c +++ b/erts/emulator/beam/utils.c @@ -2713,25 +2713,26 @@ tailrecur_ne: case SMALL_FLOAT: GET_DOUBLE(bw, f2); if (f2.fd < MAX_LOSSLESS_FLOAT && f2.fd > MIN_LOSSLESS_FLOAT) { - // Float is within the no loss limit + /* Float is within the no loss limit */ f1.fd = signed_val(aw); j = float_comp(f1.fd, f2.fd); #if ERTS_SIZEOF_ETERM == 8 } else if (f2.fd > (double) (MAX_SMALL + 1)) { - // Float is a positive bignum, i.e. bigger + /* Float is a positive bignum, i.e. bigger */ j = -1; } else if (f2.fd < (double) (MIN_SMALL - 1)) { - // Float is a negative bignum, i.e. smaller + /* Float is a negative bignum, i.e. smaller */ j = 1; - } else { // Float is a Sint but less precise + } else { + /* Float is a Sint but less precise */ j = signed_val(aw) - (Sint) f2.fd; } #else } else { - // If float is positive it is bigger than small + /* If float is positive it is bigger than small */ j = (f2.fd > 0.0) ? -1 : 1; } -#endif // ERTS_SIZEOF_ETERM == 8 +#endif /* ERTS_SIZEOF_ETERM == 8 */ break; case FLOAT_BIG: { @@ -2743,18 +2744,18 @@ tailrecur_ne: GET_DOUBLE(bw, f2); if ((f2.fd < (double) (MAX_SMALL + 1)) && (f2.fd > (double) (MIN_SMALL - 1))) { - // Float is a Sint + /* Float is a Sint */ j = big_sign(aw) ? -1 : 1; } else if (big_arity(aw) > BIG_ARITY_FLOAT_MAX || pow(2.0,(big_arity(aw)-1)*D_EXP) > fabs(f2.fd)) { - // If bignum size shows that it is bigger than the abs float + /* If bignum size shows that it is bigger than the abs float */ j = big_sign(aw) ? -1 : 1; } else if (big_arity(aw) < BIG_ARITY_FLOAT_MAX && (pow(2.0,(big_arity(aw))*D_EXP)-1.0) < fabs(f2.fd)) { - // If bignum size shows that it is smaller than the abs float + /* If bignum size shows that it is smaller than the abs float */ j = f2.fd < 0 ? 1 : -1; } else if (f2.fd < MAX_LOSSLESS_FLOAT && f2.fd > MIN_LOSSLESS_FLOAT) { - // Float is within the no loss limit + /* Float is within the no loss limit */ if (big_to_double(aw, &f1.fd) < 0) { j = big_sign(aw) ? -1 : 1; } else { @@ -2771,25 +2772,26 @@ tailrecur_ne: case FLOAT_SMALL: GET_DOUBLE(aw, f1); if (f1.fd < MAX_LOSSLESS_FLOAT && f1.fd > MIN_LOSSLESS_FLOAT) { - // Float is within the no loss limit + /* Float is within the no loss limit */ f2.fd = signed_val(bw); j = float_comp(f1.fd, f2.fd); #if ERTS_SIZEOF_ETERM == 8 } else if (f1.fd > (double) (MAX_SMALL + 1)) { - // Float is a positive bignum, i.e. bigger + /* Float is a positive bignum, i.e. bigger */ j = 1; } else if (f1.fd < (double) (MIN_SMALL - 1)) { - // Float is a negative bignum, i.e. smaller + /* Float is a negative bignum, i.e. smaller */ j = -1; - } else { // Float is a Sint but less precise it + } else { + /* Float is a Sint but less precise it */ j = (Sint) f1.fd - signed_val(bw); } #else } else { - // If float is positive it is bigger than small + /* If float is positive it is bigger than small */ j = (f1.fd > 0.0) ? 1 : -1; } -#endif // ERTS_SIZEOF_ETERM == 8 +#endif /* ERTS_SIZEOF_ETERM == 8 */ break; default: j = b_tag - a_tag; diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index 69acfc9dfd..a2ef0db83c 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -1346,7 +1346,7 @@ static void invoke_preadv(void *data) = efile_pread(&d->errInfo, (int) d->fd, c->offsets[c->cnt] + c->size, - ev->iov[1 + c->cnt].iov_base + c->size, + ((char *)ev->iov[1 + c->cnt].iov_base) + c->size, read_size, &bytes_read))) { bytes_read_so_far += bytes_read; @@ -1641,7 +1641,7 @@ static void invoke_pwritev(void *data) { - c->free_size; } d->result_ok = efile_pwrite(&d->errInfo, (int) d->fd, - iov[iovcnt].iov_base + p, + (char *)(iov[iovcnt].iov_base) + p, write_size, c->specs[c->cnt].offset); if (! d->result_ok) { @@ -2559,7 +2559,7 @@ file_async_ready(ErlDrvData e, ErlDrvThreadData data) reply_Sint64(desc, d->c.sendfile.written); desc->sendfile_state = not_sending; free_sendfile(data); - } else if (d->result_ok == 1) { // If we are using select to send the rest of the data + } else if (d->result_ok == 1) { /* If we are using select to send the rest of the data */ desc->sendfile_state = sending; desc->d = d; driver_select(desc->port, (ErlDrvEvent)(long)d->c.sendfile.out_fd, @@ -3813,7 +3813,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) { res_ev->iov[0].iov_base = res_ev->binv[0]->orig_bytes; /* Fill in the number of buffers in the header */ put_int32(0, res_ev->iov[0].iov_base); - put_int32(n, res_ev->iov[0].iov_base+4); + put_int32(n, (char *)(res_ev->iov[0].iov_base) + 4); /**/ res_ev->size = res_ev->iov[0].iov_len; if (n == 0) { @@ -4114,7 +4114,7 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) { } if (hd_len != 0 || tl_len != 0 || flags != 0) { - // We do not allow header, trailers and/or flags right now + /* We do not allow header, trailers and/or flags right now */ reply_posix_error(desc, EINVAL); goto done; } diff --git a/erts/emulator/drivers/common/erl_efile.h b/erts/emulator/drivers/common/erl_efile.h index b29b4f971c..bd85e43b8c 100644 --- a/erts/emulator/drivers/common/erl_efile.h +++ b/erts/emulator/drivers/common/erl_efile.h @@ -67,7 +67,7 @@ #define FILENAMES_16BIT 1 #endif -// We use sendfilev if it exist on solaris +/* We use sendfilev if it exist on solaris */ #if !defined(HAVE_SENDFILE) && defined(HAVE_SENDFILEV) #define HAVE_SENDFILE #endif @@ -88,20 +88,6 @@ typedef struct _Efile_error { } Efile_error; /* - * This structure contains date and time. - */ - -//typedef struct _Efile_time { -// unsigned year; /* (4 digits). */ -// unsigned month; /* (1..12). */ -// unsigned day; /* (1..31). */ -// unsigned hour; /* (0..23). */ -// unsigned minute; /* (0..59). */ -// unsigned second; /* (0..59). */ -//} Efile_time; - - -/* * Describes what is returned by file:file_info/1. */ diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index fb128fff7d..2451f41a82 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -3854,8 +3854,10 @@ static void desc_close(inet_descriptor* desc) desc->forced_events = 0; desc->send_would_block = 0; #endif - // We should close the fd here, but the other driver might still - // be selecting on it. + /* + * We should close the fd here, but the other driver might still + * be selecting on it. + */ if (!desc->is_ignored) driver_select(desc->port,(ErlDrvEvent)(long)desc->event, ERL_DRV_USE, 0); diff --git a/erts/emulator/drivers/common/zlib_drv.c b/erts/emulator/drivers/common/zlib_drv.c index 60394b610b..89b7be14f2 100644 --- a/erts/emulator/drivers/common/zlib_drv.c +++ b/erts/emulator/drivers/common/zlib_drv.c @@ -119,7 +119,7 @@ static int zlib_deflate(ZLibData* d, int flush); #if defined(__WIN32__) static int i32(char* buf) #else -static inline int i32(char* buf) +static __inline__ int i32(char* buf) #endif { return (int) ( diff --git a/erts/emulator/drivers/unix/unix_efile.c b/erts/emulator/drivers/unix/unix_efile.c index 558651fff9..2bd5177be1 100644 --- a/erts/emulator/drivers/unix/unix_efile.c +++ b/erts/emulator/drivers/unix/unix_efile.c @@ -629,7 +629,7 @@ efile_writev(Efile_error* errInfo, /* Where to return error codes */ if (w < iov[cnt].iov_len) { /* Adjust the buffer for next write */ iov[cnt].iov_len -= w; - iov[cnt].iov_base += w; + iov[cnt].iov_base = ((char *)iov[cnt].iov_base) + w; w = 0; break; } else { diff --git a/erts/emulator/hipe/hipe_native_bif.c b/erts/emulator/hipe/hipe_native_bif.c index ae2c650bd2..1f76268934 100644 --- a/erts/emulator/hipe/hipe_native_bif.c +++ b/erts/emulator/hipe/hipe_native_bif.c @@ -238,7 +238,7 @@ void hipe_handle_exception(Process *c_p) if (c_p->mbuf) { erts_printf("%s line %u: p==%p, p->mbuf==%p\n", __FUNCTION__, __LINE__, c_p, c_p->mbuf); - //erts_garbage_collect(c_p, 0, NULL, 0); + /* erts_garbage_collect(c_p, 0, NULL, 0); */ } /* @@ -270,7 +270,7 @@ void hipe_handle_exception(Process *c_p) c_p->def_arg_reg[0] = exception_tag[GET_EXC_CLASS(c_p->freason)]; if (c_p->mbuf) { - //erts_printf("%s line %u: p==%p, p->mbuf==%p, p->lastbif==%p\n", __FUNCTION__, __LINE__, c_p, c_p->mbuf, c_p->hipe.lastbif); + /* erts_printf("%s line %u: p==%p, p->mbuf==%p, p->lastbif==%p\n", __FUNCTION__, __LINE__, c_p, c_p->mbuf, c_p->hipe.lastbif); */ erts_garbage_collect(c_p, 0, NULL, 0); } diff --git a/erts/emulator/hipe/hipe_x86_gc.h b/erts/emulator/hipe/hipe_x86_gc.h index ccb0d2ffb8..ac6b4f70bb 100644 --- a/erts/emulator/hipe/hipe_x86_gc.h +++ b/erts/emulator/hipe/hipe_x86_gc.h @@ -25,7 +25,7 @@ #include "hipe_x86_asm.h" /* for NR_ARG_REGS */ /* uncomment to simulate & test what the initial PowerPC port will do */ -//#define SKIP_YOUNGEST_FRAME +/* #define SKIP_YOUNGEST_FRAME */ struct nstack_walk_state { #ifdef SKIP_YOUNGEST_FRAME diff --git a/erts/emulator/pcre/pcre_exec.c b/erts/emulator/pcre/pcre_exec.c index 3fe13ca32e..26cb219ef1 100644 --- a/erts/emulator/pcre/pcre_exec.c +++ b/erts/emulator/pcre/pcre_exec.c @@ -36,7 +36,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ----------------------------------------------------------------------------- */ -//#define ERLANG_DEBUG 1 +/* #define ERLANG_DEBUG 1 */ /* This module contains erts_pcre_exec(), the externally visible function that does pattern matching using an NFA algorithm, trying to mimic Perl as closely as diff --git a/erts/emulator/sys/common/erl_mseg.c b/erts/emulator/sys/common/erl_mseg.c index bd8ba82a5f..b6e2c9382b 100644 --- a/erts/emulator/sys/common/erl_mseg.c +++ b/erts/emulator/sys/common/erl_mseg.c @@ -350,7 +350,7 @@ schedule_cache_check(ErtsMsegAllctr_t *ma) { static ERTS_INLINE void * mmap_align(ErtsMsegAllctr_t *ma, void *addr, size_t length, int prot, int flags, int fd, off_t offset) { - void *p, *q; + char *p, *q; UWord d; p = mmap(addr, length, prot, flags, fd, offset); @@ -366,14 +366,14 @@ mmap_align(ErtsMsegAllctr_t *ma, void *addr, size_t length, int prot, int flags, if ((p = mmap(addr, length + MSEG_ALIGNED_SIZE, prot, flags, fd, offset)) == MAP_FAILED) return MAP_FAILED; - q = (void *)ALIGNED_CEILING(p); - d = q - p; + q = (void *)ALIGNED_CEILING((char *)p); + d = (UWord)(q - p); if (d > 0) munmap(p, d); if (MSEG_ALIGNED_SIZE - d > 0) - munmap((void *) (q + length), MSEG_ALIGNED_SIZE - d); + munmap((void *)(q + length), MSEG_ALIGNED_SIZE - d); return q; } @@ -439,7 +439,7 @@ mseg_destroy(ErtsMsegAllctr_t *ma, MemKind* mk, void *seg, Uint size) { } #if HAVE_MSEG_RECREATE -#if defined(__NetBsd__) +#if defined(__NetBSD__) #define MREMAP_FLAGS (0) #else #define MREMAP_FLAGS (MREMAP_MAYMOVE) @@ -708,7 +708,7 @@ static ERTS_INLINE void *cache_get_segment(MemKind *mk, Uint *size_p, Uint flags /* Use current cache placement for remaining segment space */ - best->seg = seg + size; + best->seg = ((char *)seg) + size; best->size = csize - size; ASSERT((size % GET_PAGE_SIZE) == 0); @@ -1028,7 +1028,7 @@ mseg_realloc(ErtsMsegAllctr_t *ma, ErtsAlcType_t atype, void *seg, sys_memcpy(((char *) new_seg), ((char *) seg), MIN(new_size, old_size)); - mseg_dealloc(ma, atype, seg, old_size, opt); + mseg_dealloc(ma, atype, seg, old_size, flags, opt); } #endif } diff --git a/erts/emulator/sys/unix/sys_float.c b/erts/emulator/sys/unix/sys_float.c index f2f4de869d..787f8d6728 100644 --- a/erts/emulator/sys/unix/sys_float.c +++ b/erts/emulator/sys/unix/sys_float.c @@ -152,7 +152,7 @@ static int mask_sse2(void) #if defined(__x86_64__) -static inline int cpu_has_sse2(void) { return 1; } +static ERTS_INLINE int cpu_has_sse2(void) { return 1; } #else /* !__x86_64__ */ @@ -179,7 +179,7 @@ static unsigned int xor_eflags(unsigned int mask) return eax; } -static __inline__ unsigned int cpuid_eax(unsigned int op) +static ERTS_INLINE unsigned int cpuid_eax(unsigned int op) { unsigned int eax, save_ebx; @@ -195,7 +195,7 @@ static __inline__ unsigned int cpuid_eax(unsigned int op) return eax; } -static __inline__ unsigned int cpuid_edx(unsigned int op) +static ERTS_INLINE unsigned int cpuid_edx(unsigned int op) { unsigned int eax, edx, save_ebx; @@ -215,7 +215,7 @@ static __inline__ unsigned int cpuid_edx(unsigned int op) * register on the Intel486 processor to generate alignment * faults. This bit cannot be set on the Intel386 processor. */ -static __inline__ int is_386(void) +static ERTS_INLINE int is_386(void) { return ((xor_eflags(1<<18) >> 18) & 1) == 0; } @@ -223,7 +223,7 @@ static __inline__ int is_386(void) /* Newer x86 processors have a CPUID instruction, as indicated by * the ID bit (#21) in EFLAGS being modifiable. */ -static __inline__ int has_CPUID(void) +static ERTS_INLINE int has_CPUID(void) { return (xor_eflags(1<<21) >> 21) & 1; } diff --git a/erts/vsn.mk b/erts/vsn.mk index 4cdc20b550..255def22ca 100644 --- a/erts/vsn.mk +++ b/erts/vsn.mk @@ -17,8 +17,8 @@ # %CopyrightEnd% # -VSN = 5.10.1 -SYSTEM_VSN = R16B +VSN = 5.10.2 +SYSTEM_VSN = R16B01 # Port number 4365 in 4.2 # Port number 4366 in 4.3 |