~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to erts/doc/src/notes.xml

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090215164252-q5x4rcf8a5pbesb1
Tags: 1:12.b.5-dfsg-2
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="latin1" ?>
 
2
<!DOCTYPE chapter SYSTEM "chapter.dtd">
 
3
 
 
4
<chapter>
 
5
  <header>
 
6
    <copyright>
 
7
      <year>2004</year>
 
8
      <year>2007</year>
 
9
      <holder>Ericsson AB, All Rights Reserved</holder>
 
10
    </copyright>
 
11
    <legalnotice>
 
12
  The contents of this file are subject to the Erlang Public License,
 
13
  Version 1.1, (the "License"); you may not use this file except in
 
14
  compliance with the License. You should have received a copy of the
 
15
  Erlang Public License along with this software. If not, it can be
 
16
  retrieved online at http://www.erlang.org/.
 
17
 
 
18
  Software distributed under the License is distributed on an "AS IS"
 
19
  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 
20
  the License for the specific language governing rights and limitations
 
21
  under the License.
 
22
 
 
23
  The Initial Developer of the Original Code is Ericsson AB.
 
24
    </legalnotice>
 
25
 
 
26
    <title>ERTS Release Notes</title>
 
27
    <prepared>otp_appnotes</prepared>
 
28
    <docno>nil</docno>
 
29
    <date>nil</date>
 
30
    <rev>nil</rev>
 
31
  </header>
 
32
  <p>This document describes the changes made to the ERTS application.</p>
 
33
 
 
34
<section><title>Erts 5.6.5</title>
 
35
 
 
36
    <section><title>Fixed Bugs and Malfunctions</title>
 
37
      <list>
 
38
        <item>
 
39
          <p>
 
40
            A bug in inet_drv concerning gen_tcp:connect has been
 
41
            corrected. A connect towards a non-open port through open
 
42
            firewalls could sometimes erroneously be successful. Any
 
43
            subsequent operation would fail, though.</p>
 
44
          <p>
 
45
            Own Id: OTP-6542</p>
 
46
        </item>
 
47
        <item>
 
48
          <p>
 
49
            Floating point arithmetics in drivers could cause a
 
50
            runtime system crash and/or unexpected results on runtime
 
51
            systems with floating point exceptions enabled. Floating
 
52
            point exceptions are disabled unless explicitly enabled
 
53
            or if hipe is enabled.</p>
 
54
          <p>
 
55
            Own Id: OTP-7237</p>
 
56
        </item>
 
57
        <item>
 
58
          <p>
 
59
            A bug when many sockets got signalled simultaneously
 
60
            causing the emulator to panic with the message
 
61
            "Inconsistent, why isnt io reported?" is now corrected.</p>
 
62
          <p>
 
63
            Own Id: OTP-7420</p>
 
64
        </item>
 
65
        <item>
 
66
          <p>
 
67
            Starting erl with option "-detached" now disconnects
 
68
            correctly from terminal session on Unix.</p>
 
69
          <p>
 
70
            Own Id: OTP-7461</p>
 
71
        </item>
 
72
        <item>
 
73
          <p>
 
74
            Mended gdb etp-commands for ETS access.</p>
 
75
          <p>
 
76
            Own Id: OTP-7538</p>
 
77
        </item>
 
78
        <item>
 
79
          <p>
 
80
            <c>erlang:decode_packet/3</c> allows white space between
 
81
            HTTP header tag and colon according to RFC2616.</p>
 
82
          <p>
 
83
            Own Id: OTP-7543</p>
 
84
        </item>
 
85
        <item>
 
86
          <p>
 
87
            An emulator compiled for SCTP now starts even if the
 
88
            dynamic libraries are not present. The SCTP driver is
 
89
            then of course not loaded.</p>
 
90
          <p>
 
91
            Own Id: OTP-7551</p>
 
92
        </item>
 
93
        <item>
 
94
            <p>To build on Mac OS X, 10.3.0 or later is now required
 
95
            because of fixes for two problems:</p>
 
96
            <p>There would be a resource leak when <c>erl_ddl</c>
 
97
            attempted to unload a driver. This problem has been
 
98
            corrected by using <c>dlopen()</c> (which works on all
 
99
            modern Unix-like platforms) instead of the Mac OS X
 
100
            specific API calls.</p>
 
101
            <p>Signal handling in the run-time system for HiPE has
 
102
            been updated to work on later versions of Mac OS X than
 
103
            10.2.x. Therefore, <c>--enable-hipe</c> now works on Mac
 
104
            OS X with Intel CPUs.</p>
 
105
            <p>Thanks to Geoff Cant for the patches.</p>
 
106
          <p>
 
107
            Own Id: OTP-7562</p>
 
108
        </item>
 
109
        <item>
 
110
            <p>Corrected some information about the protocol between
 
111
            EPMD and Erlang nodes. (Thanks to Michael Regen.)</p>
 
112
          <p>
 
113
            Own Id: OTP-7594</p>
 
114
        </item>
 
115
        <item>
 
116
          <p>
 
117
            When using
 
118
            <c>erlang:system_monitor(Pid,{long_gc,Time})</c>, and the
 
119
            GC time exceeded 1 second, it sometimes erroneously
 
120
            showed up as about 4300 seconds. (This bug was corrected
 
121
            in R9C, but re-introduced in R12B.) (Thanks to Chris
 
122
            Newcombe.)</p>
 
123
          <p>
 
124
            Own Id: OTP-7622 Aux Id: OTP-4903, seq8379 </p>
 
125
        </item>
 
126
      </list>
 
127
    </section>
 
128
 
 
129
 
 
130
    <section><title>Improvements and New Features</title>
 
131
      <list>
 
132
        <item>
 
133
          <p>
 
134
            The driver entry of a dynamically loaded driver is now
 
135
            copied when loaded which enables some internal
 
136
            optimizations. Note that drivers that modify the driver
 
137
            entry during execution will not work anymore. Such a
 
138
            miss-use of the driver interface is however not
 
139
            supported.</p>
 
140
          <p>
 
141
            Own Id: OTP-6900</p>
 
142
        </item>
 
143
        <item>
 
144
          <p>
 
145
            The split function is now added to the re library.
 
146
            Exceptions and errors from both run, replace and split
 
147
            are made more consistent.</p>
 
148
          <p>
 
149
            Own Id: OTP-7514 Aux Id: OTP-7494 </p>
 
150
        </item>
 
151
        <item>
 
152
          <p>
 
153
            Fixed harmless compiler warnings when building the
 
154
            emulator and minor build changes in order to avoid
 
155
            unnecessary rebuilds.</p>
 
156
          <p>
 
157
            Own Id: OTP-7530</p>
 
158
        </item>
 
159
        <item>
 
160
          <p>
 
161
            There is now experimental support for loading of code
 
162
            from archive files. See the documentation of <c>code</c>,
 
163
            <c>init</c>, <c>erl_prim_loader </c> and <c>escript</c>
 
164
            for more info.</p>
 
165
          <p>
 
166
            The error handling of <c>escripts</c> has been improved.</p>
 
167
          <p>
 
168
            An <c>escript</c> may now set explicit arguments to the
 
169
            emulator, such as <c>-smp enabled</c>.</p>
 
170
          <p>
 
171
            An <c>escript</c> may now contain a precompiled beam
 
172
            file.</p>
 
173
          <p>
 
174
            An <c>escript</c> may now contain an archive file
 
175
            containing one or more applications (experimental).</p>
 
176
          <p>
 
177
            The internal module <c>code_aux</c> has been removed.</p>
 
178
          <p>
 
179
            Own Id: OTP-7548 Aux Id: otp-6622 </p>
 
180
        </item>
 
181
        <item>
 
182
          <p>
 
183
            The reallocation functionality part of the ERTS internal
 
184
            memory allocators, now consider current block in
 
185
            combination with surrounding free blocks as an
 
186
            alternative location for a reallocation.</p>
 
187
          <p>
 
188
            Own Id: OTP-7555</p>
 
189
        </item>
 
190
        <item>
 
191
            <p>There could remain false references from a process to
 
192
            a module that has been called earlier, so that the
 
193
            process would be killed if the module was reloaded.
 
194
            (Thanks to Richard Carlsson.)</p>
 
195
            <p>Also, the fix for this bug also made it possible to
 
196
            make stack backtraces (as returned from
 
197
            <c>erlang:get_stacktrace/0</c> and other functions) more
 
198
            correct in that the immediate caller is always included
 
199
            in the stack backtrace (it could sometimes be
 
200
            missing).</p>
 
201
          <p>
 
202
            Own Id: OTP-7559</p>
 
203
        </item>
 
204
        <item>
 
205
          <p>
 
206
            Improved locking in IO-handling for better smp
 
207
            performance.</p>
 
208
          <p>
 
209
            Own Id: OTP-7560</p>
 
210
        </item>
 
211
        <item>
 
212
          <p>
 
213
            Improved BIF rescheduling functionanality.</p>
 
214
          <p>
 
215
            Own Id: OTP-7587</p>
 
216
        </item>
 
217
        <item>
 
218
          <p>
 
219
            Loading a module compiled with Erlang/OTP R9C and calling
 
220
            <c>module_info/0</c> in the module would crash the
 
221
            emulator. The emulator now refuses to load any module
 
222
            compiled with R9C or earlier. (Note: only trivial modules
 
223
            compiled with R10B or earlier could be loaded anyway.)
 
224
            (Thanks to Martin Kjellin.)</p>
 
225
          <p>
 
226
            Own Id: OTP-7590</p>
 
227
        </item>
 
228
      </list>
 
229
    </section>
 
230
 
 
231
</section>
 
232
 
 
233
<section><title>Erts 5.6.4.2</title>
 
234
 
 
235
    <section><title>Fixed Bugs and Malfunctions</title>
 
236
      <list>
 
237
        <item>
 
238
          <p>
 
239
            A process calling one of the following BIFs could under
 
240
            very rare conditions deadlock in the runtime system with
 
241
            SMP support: <c>check_process_code/2</c>,
 
242
            <c>garbage_collect/1</c>, <c>process_info/[1,2]</c>,
 
243
            <c>system_flag/2</c>, and
 
244
            <c>erlang:suspend_process/[1,2]</c>.</p>
 
245
          <p>
 
246
            Own Id: OTP-7582</p>
 
247
        </item>
 
248
        <item>
 
249
          <p>
 
250
            A couple of statistics variables were not managed in a
 
251
            thread safe manner in the runtime system with SMP
 
252
            support.</p>
 
253
          <p>
 
254
            Own Id: OTP-7583</p>
 
255
        </item>
 
256
        <item>
 
257
          <p>
 
258
            An extremely rare race condition when terminating a
 
259
            process could potentially cause a runtime system crash.</p>
 
260
          <p>
 
261
            Own Id: OTP-7584</p>
 
262
        </item>
 
263
        <item>
 
264
          <p>
 
265
            Under certain conditions and when using run_erl/to_erl,
 
266
            the terminal Erlang driver (ttsl_drv) could crash the
 
267
            emulator by doing a division by zero due to incorrect
 
268
            handling of terminals reporting a zero width. For
 
269
            terminals reporting zero width, the driver now fallbacks
 
270
            to a default width of 80 and a default height of 24
 
271
            (vt100), as a fallback behaviour. This fixes the crashes
 
272
            and also makes output on "dumb" terminals much more
 
273
            readable.</p>
 
274
          <p>
 
275
            Own Id: OTP-7592 Aux Id: seq11073 </p>
 
276
        </item>
 
277
      </list>
 
278
    </section>
 
279
 
 
280
</section>
 
281
 
 
282
<section><title>Erts 5.6.4.1</title>
 
283
 
 
284
    <section><title>Improvements and New Features</title>
 
285
      <list>
 
286
        <item>
 
287
          <p>
 
288
            A new <c>erts_alloc</c> parameter
 
289
            <c>+M&lt;S&gt;rmbcmt</c> (relative multiblock carrier
 
290
            move threshold) has been added. It determines when to
 
291
            force a moving realloc in a multiblock carrier when a
 
292
            block is shrunk. For more information see the
 
293
            <c>erts_alloc(3)</c> documentation.</p>
 
294
          <p>
 
295
            Own Id: OTP-7540</p>
 
296
        </item>
 
297
        <item>
 
298
            <p>The new option <c>+d</c> can be given to <c>erl</c> to
 
299
            suppress the crash dump generation if an internal error
 
300
            is detected. As a result, a more useful core dump is
 
301
            produced.</p>
 
302
          <p>
 
303
            Own Id: OTP-7578 Aux Id: seq11052 </p>
 
304
        </item>
 
305
      </list>
 
306
    </section>
 
307
 
 
308
</section>
 
309
 
 
310
<section><title>Erts 5.6.4</title>
 
311
 
 
312
    <section><title>Fixed Bugs and Malfunctions</title>
 
313
      <list>
 
314
        <item>
 
315
          <p>
 
316
            Double backslashes in format string passed to the erts
 
317
            internal printf implementation produced erroneous
 
318
            results. No such format strings were passed to the erts
 
319
            internal printf implementation, i.e., the bug was
 
320
            therefore completely harmless. (Thanks to Perry Smith.)</p>
 
321
          <p>
 
322
            Own Id: OTP-7408</p>
 
323
        </item>
 
324
        <item>
 
325
          <p>
 
326
            Large files are now handled on Windows, where the
 
327
            filesystem supports it.</p>
 
328
          <p>
 
329
            Own Id: OTP-7410</p>
 
330
        </item>
 
331
        <item>
 
332
          <p>
 
333
            Bug fixed for <c>{packet,http}</c> when space follows
 
334
            http headers.</p>
 
335
          <p>
 
336
            Own Id: OTP-7458</p>
 
337
        </item>
 
338
        <item>
 
339
          <p>
 
340
            The trace option <c>running</c> could cause an emulator
 
341
            crash if the current function couldn't be determined.</p>
 
342
          <p>
 
343
            Own Id: OTP-7484</p>
 
344
        </item>
 
345
        <item>
 
346
          <p>
 
347
            Using 16#ffffFFFF as a timeout value in receive...after
 
348
            would often cause a timeout almost at once due to an
 
349
            32-bit integer overflow. (Thanks to Serge Aleynikov and
 
350
            Matthias Lang.)</p>
 
351
          <p>
 
352
            Own Id: OTP-7493</p>
 
353
        </item>
 
354
        <item>
 
355
          <p>
 
356
            For the process that an escript runs in, the
 
357
            <c>trap_exit</c> process flag is now <c>false</c> instead
 
358
            of <c>true</c> (as in previous releases). Scripts that
 
359
            depend on the previous (counter-intuitive) behaviour
 
360
            might not work. (Thanks to Bengt Kleberg.)</p>
 
361
          <p>
 
362
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
363
          <p>
 
364
            Own Id: OTP-7517</p>
 
365
        </item>
 
366
        <item>
 
367
          <p>
 
368
            A bug in the <c>string:to_integer/1</c> builtin made the
 
369
            emulator unstable. This is now corrected. (Thanks to Lev
 
370
            Walkin.)</p>
 
371
          <p>
 
372
            Own Id: OTP-7526</p>
 
373
        </item>
 
374
      </list>
 
375
    </section>
 
376
 
 
377
 
 
378
    <section><title>Improvements and New Features</title>
 
379
      <list>
 
380
        <item>
 
381
            <p>Performance for ETS intensive applications should now
 
382
            be better in the SMP emulator. Also, ETS table
 
383
            identifiers (as returned by <c>ets:new/2</c>) are now
 
384
            spread out in wider range than before (using 28 bits in a
 
385
            32-bit emulator) to make sure that the table identifier
 
386
            for a deleted table will not be quickly re-used.</p>
 
387
            <p>NOTE: Table identifiers can now be negative integers.
 
388
            Programs that (incorrectly) assume that table identifiers
 
389
            can only be positive integers might stop to work. (The
 
390
            type of a table identifier is intentionally not
 
391
            documented, and may change in a future release.)</p>
 
392
          <p>
 
393
            Own Id: OTP-7348</p>
 
394
        </item>
 
395
        <item>
 
396
          <p>
 
397
            New BIF <c>erlang:decode_packet/3</c> that extracts a
 
398
            protocol packet from a binary. Similar to the socket
 
399
            option <c>{packet, Type}</c>. Also documented the socket
 
400
            packet type <c>http</c> and made it official.
 
401
            <em>NOTE</em>: The tuple format for <c>http</c> packets
 
402
            sent from an active socket has been changed in an
 
403
            incompatible way.</p>
 
404
          <p>
 
405
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
406
          <p>
 
407
            Own Id: OTP-7404</p>
 
408
        </item>
 
409
        <item>
 
410
          <p>
 
411
            The source code for the documentation for some
 
412
            applications (erts, kernel, stdlib, and several others)
 
413
            are now included in the source tar ball. There is
 
414
            currently no Makefile support for building HTML files
 
415
            from the source (such support will be included in a
 
416
            future release).</p>
 
417
          <p>
 
418
            Own Id: OTP-7406</p>
 
419
        </item>
 
420
        <item>
 
421
          <p>
 
422
            A lot of frequently accessed memory counters (erts
 
423
            internal) have been removed. This since they hurt
 
424
            performance on the runtime system with SMP support. As a
 
425
            result <c>erlang:memory/[0,1]</c> will only deliver a
 
426
            result if all <c>erts_alloc(3)</c> allocators are enabled
 
427
            (default). The result delivered when all
 
428
            <c>erts_alloc(3)</c> allocators are enabled are both more
 
429
            accurate and less accurate than before. More memory than
 
430
            before are included in the result, but the different
 
431
            parts that are summed are not gathered atomically. A call
 
432
            to <c>erlang:memory/[0,1]</c> is much cheaper for the
 
433
            system than before. This since the information isn't
 
434
            gathered atomically anymore which was very expensive.</p>
 
435
          <p>
 
436
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
437
          <p>
 
438
            Own Id: OTP-7468</p>
 
439
        </item>
 
440
        <item>
 
441
          <p>
 
442
            Pre-allocators used for, for example, timers, and
 
443
            messages have been rewritten to be scheduler specific.
 
444
            That is, different schedulers will now allocate from
 
445
            different pools which reduces lock contention.</p>
 
446
          <p>
 
447
            Own Id: OTP-7470</p>
 
448
        </item>
 
449
        <item>
 
450
          <p>
 
451
            On Mac OS X, file:sync/1 now guarantees that all
 
452
            filesystem buffers are written to the disk by using the
 
453
            fcntl() with F_FULLFSYNC option. Previously, file:sync/1
 
454
            called fsync(), which only guaranteed that the data had
 
455
            been transferred to the disk drive. (Thanks to Jan
 
456
            Lehnardt.)</p>
 
457
          <p>
 
458
            Own Id: OTP-7471</p>
 
459
        </item>
 
460
        <item>
 
461
          <p>
 
462
            Termination of a process that takes a long time can now
 
463
            be preempted, i.e., the terminating process will be
 
464
            rescheduled for later continuation of termination so that
 
465
            other processes can execute. Termination of a process
 
466
            that owns many and/or large ets tables typically takes a
 
467
            long time.</p>
 
468
          <p>
 
469
            Own Id: OTP-7477</p>
 
470
        </item>
 
471
        <item>
 
472
          <p>
 
473
            A new trace option <c>exiting</c> has been added. The
 
474
            <c>exiting</c> trace is similar to the <c>running</c>
 
475
            trace, but for exiting processes. For more information
 
476
            see the erlang(3) documentation.</p>
 
477
          <p>
 
478
            The <c>erlang:trace/3</c> bif now doesn't block other
 
479
            scheduler threads if only one tracee is specified in the
 
480
            call to <c>erlang:trace/3</c>.</p>
 
481
          <p>
 
482
            Own Id: OTP-7481</p>
 
483
        </item>
 
484
        <item>
 
485
          <p>
 
486
            The re module is exdended with repetitive matches (global
 
487
            option) and replacement function.</p>
 
488
          <p>
 
489
            Own Id: OTP-7494 Aux Id: OTP-7181 </p>
 
490
        </item>
 
491
        <item>
 
492
          <p>
 
493
            In the section about binary construction, the reference
 
494
            manual now mentions what happens when an integer value
 
495
            does not fit into an integer segment of size N (namely,
 
496
            that the N least significant bits will be put into into
 
497
            the binary and that the most significant bits will be
 
498
            silently discarded). (Thanks to Edwin Fine.)</p>
 
499
          <p>
 
500
            Own Id: OTP-7506</p>
 
501
        </item>
 
502
        <item>
 
503
          <p>
 
504
            Setting the <c>{active,once}</c> for a socket (using
 
505
            inets:setopts/2) is now specially optimized (because the
 
506
            <c>{active,once}</c> option is typically used much more
 
507
            frequently than other options).</p>
 
508
          <p>
 
509
            Own Id: OTP-7520</p>
 
510
        </item>
 
511
      </list>
 
512
    </section>
 
513
 
 
514
 
 
515
    <section><title>Known Bugs and Problems</title>
 
516
      <list>
 
517
        <item>
 
518
          <p>
 
519
            Floating point arithmetics in drivers can cause a runtime
 
520
            system crash and/or unexpected results on runtime systems
 
521
            with floating point exceptions enabled. Floating point
 
522
            exceptions are disabled unless explicitly enabled or if
 
523
            hipe is enabled.</p>
 
524
          <p>
 
525
            Own Id: OTP-7237</p>
 
526
        </item>
 
527
      </list>
 
528
    </section>
 
529
 
 
530
</section>
 
531
 
 
532
<section><title>Erts 5.6.3.3</title>
 
533
 
 
534
    <section><title>Fixed Bugs and Malfunctions</title>
 
535
      <list>
 
536
        <item>
 
537
          <p>
 
538
            Binary construction with an integer field of size 0 at
 
539
            the end of the constructed binary (and the size given in
 
540
            a variable), would cause a write of one byte outside the
 
541
            memory reserved for the binary, which in turn could cause
 
542
            an emulator crash.</p>
 
543
          <p>
 
544
            Own Id: OTP-7422</p>
 
545
        </item>
 
546
        <item>
 
547
          <p>
 
548
            A race condition in the dynamic driver implementation
 
549
            could cause an emulator crash. (Thanks to Paul Fisher)</p>
 
550
          <p>
 
551
            Own Id: OTP-7464</p>
 
552
        </item>
 
553
        <item>
 
554
          <p>
 
555
            Calls to <c>erlang:system_info(allocated_areas)</c> could
 
556
            cause the runtime system with SMP support to crash.</p>
 
557
          <p>
 
558
            Own Id: OTP-7474</p>
 
559
        </item>
 
560
        <item>
 
561
          <p>
 
562
            The <c>env</c> option to <c>open_port()</c> could cause
 
563
            the runtime system with SMP support to crash.</p>
 
564
          <p>
 
565
            Own Id: OTP-7475</p>
 
566
        </item>
 
567
      </list>
 
568
    </section>
 
569
 
 
570
 
 
571
    <section><title>Improvements and New Features</title>
 
572
      <list>
 
573
        <item>
 
574
          <p>
 
575
            Operations that needed to block other threads in the
 
576
            runtime system with SMP support unnecessarily waited for
 
577
            async threads to block. Most important the
 
578
            <c>erlang:memory/[0,1]</c> bif, code loading, and the
 
579
            <c>erlang:trace/3</c> bif.</p>
 
580
          <p>
 
581
            Own Id: OTP-7480</p>
 
582
        </item>
 
583
      </list>
 
584
    </section>
 
585
 
 
586
</section>
 
587
 
 
588
<section><title>Erts 5.6.3.2</title>
 
589
 
 
590
    <section><title>Fixed Bugs and Malfunctions</title>
 
591
      <list>
 
592
        <item>
 
593
          <p>
 
594
            Calls to <c>erlang:memory/[0,1]</c> could cause the
 
595
            runtime system with SMP support to crash.</p>
 
596
          <p>
 
597
            Own Id: OTP-7415</p>
 
598
        </item>
 
599
      </list>
 
600
    </section>
 
601
 
 
602
</section>
 
603
 
 
604
<section><title>Erts 5.6.3.1</title>
 
605
 
 
606
    <section><title>Fixed Bugs and Malfunctions</title>
 
607
      <list>
 
608
        <item>
 
609
          <p>
 
610
            Doing local call trace on bit syntax matching code that
 
611
            has been optimized with delayed sub-binary creation could
 
612
            crash the emulator.</p>
 
613
          <p>
 
614
            Own Id: OTP-7399 Aux Id: seq10978 </p>
 
615
        </item>
 
616
      </list>
 
617
    </section>
 
618
 
 
619
</section>
 
620
 
 
621
<section><title>Erts 5.6.3</title>
 
622
 
 
623
    <section><title>Fixed Bugs and Malfunctions</title>
 
624
      <list>
 
625
        <item>
 
626
          <p>
 
627
            Only one to_erl process at a time is allowed to connect
 
628
            to the same run_erl pipe. Prevents buggy behaviour when
 
629
            IO from several to_erl's get interleaved.</p>
 
630
          <p>
 
631
            Own Id: OTP-5107</p>
 
632
        </item>
 
633
        <item>
 
634
          <p>
 
635
            IPv6 name resolving has now been fixed to use
 
636
            getaddrinfo() patch (thorughly reworked) courtesy of Love
 
637
            H�rnquist-�strand submitted by Fredrik Thulin. It also
 
638
            can use gethostname2() patch (also reworked) courtesy of
 
639
            Mikael Magnusson for debian submitted by Sergei Golovan.</p>
 
640
          <p>
 
641
            Own Id: OTP-5382</p>
 
642
        </item>
 
643
        <item>
 
644
          <p>
 
645
            Improved error handling in run_erl</p>
 
646
          <p>
 
647
            Own Id: OTP-7252</p>
 
648
        </item>
 
649
        <item>
 
650
            <p>A permanent fix for the deadlock issue temporarily
 
651
            fixed by OTP-7260.</p> <taglist><tag>OTP-7260</tag><item>
 
652
            The runtime system with SMP support could under rare
 
653
            circumstances deadlock when a distribution channel was
 
654
            taken down while multiple simultaneous operations were
 
655
            performed on it. </item></taglist>
 
656
          <p>
 
657
            Own Id: OTP-7267 Aux Id: OTP-7260 </p>
 
658
        </item>
 
659
        <item>
 
660
          <p>
 
661
            ./configure has been improved to find 64-bit OpenSSL
 
662
            libraries.</p>
 
663
          <p>
 
664
            Own Id: OTP-7270</p>
 
665
        </item>
 
666
        <item>
 
667
          <p>
 
668
            A terminating process could under very rare circumstances
 
669
            trigger a bug which could crash the runtime system with
 
670
            SMP support.</p>
 
671
          <p>
 
672
            Own Id: OTP-7272</p>
 
673
        </item>
 
674
        <item>
 
675
          <p>
 
676
            SCTP_ADDR_CONFIRMED events are now handled by gen_sctp.</p>
 
677
          <p>
 
678
            Own Id: OTP-7276</p>
 
679
        </item>
 
680
        <item>
 
681
          <p>
 
682
            binary_to_term/1 would crash the emulator if the binary
 
683
            data contained an external fun with non-atom module
 
684
            and/or function. Corrected to generate a badarg
 
685
            exception.</p>
 
686
          <p>
 
687
            Own Id: OTP-7281</p>
 
688
        </item>
 
689
        <item>
 
690
          <p>
 
691
            On Mac OS 10.5 (Leopard), sending to socket which the
 
692
            other end closes could cause the emulator to consume 100%
 
693
            CPU time. (Thanks to Matthias Radestock.)</p>
 
694
          <p>
 
695
            Own Id: OTP-7289</p>
 
696
        </item>
 
697
        <item>
 
698
          <p>
 
699
            The vanilla driver used on Windows could crash the
 
700
            emulator and sometimes produced corrupt files. The
 
701
            vanilla driver is the driver that is used when one only
 
702
            pass a filename as first argument to <c>open_port/2</c>.
 
703
            <em>NOTE</em>: This use of <c>open_port/2</c> is
 
704
            <em>obsolete</em>, and the documentation of this use has
 
705
            previously been removed. The functionality is only
 
706
            present for backward compatibility reasons and
 
707
            <em>will</em> eventually be removed.</p>
 
708
          <p>
 
709
            Own Id: OTP-7301</p>
 
710
        </item>
 
711
        <item>
 
712
          <p>
 
713
            Faulty matching in binaries larger than 512Mb on 64bit
 
714
            machines fixed.(On 32bit, the size limit for binaries is
 
715
            still 512Mb). Thanks to Edwin Fine and Per Gustafsson for
 
716
            finding fault and fix.</p>
 
717
          <p>
 
718
            Own Id: OTP-7309</p>
 
719
        </item>
 
720
        <item>
 
721
          <p>
 
722
            crypto:start() on Windows caused emulator to hang on
 
723
            error popup window if openssl DLL was not found. Windows
 
724
            error popups now suppressed.</p>
 
725
          <p>
 
726
            Own Id: OTP-7325</p>
 
727
        </item>
 
728
        <item>
 
729
          <p>
 
730
            Configuration option <c>witout-termcap</c> can be used to
 
731
            disable the use of termcap libraries for terminal cursor
 
732
            control in the shell.</p>
 
733
          <p>
 
734
            Own Id: OTP-7338</p>
 
735
        </item>
 
736
        <item>
 
737
          <p>
 
738
            to_erl reports its terminal window size to run_erl in
 
739
            order to get output formatted accordingly</p>
 
740
          <p>
 
741
            Own Id: OTP-7342</p>
 
742
        </item>
 
743
        <item>
 
744
          <p>
 
745
            On Solaris, the <c>compressed</c> option for file
 
746
            operations did not work if the file descriptor happened
 
747
            to be greater than 255 (a problem with fopen() and
 
748
            friends in Solaris itself).</p>
 
749
          <p>
 
750
            Own Id: OTP-7343 Aux Id: seq10949 </p>
 
751
        </item>
 
752
        <item>
 
753
          <p>
 
754
            A race condition in the runtime system with SMP support
 
755
            causing an erroneous removal of a newly created ets table
 
756
            has been fixed.</p>
 
757
          <p>
 
758
            The race occurred when a process removed a table during
 
759
            termination simultaneously as another process removed the
 
760
            same table via <c>ets:delete/1</c> and a third process
 
761
            created a table that accidently got the same internal
 
762
            table index as the table being removed.</p>
 
763
          <p>
 
764
            Own Id: OTP-7349</p>
 
765
        </item>
 
766
        <item>
 
767
          <p>
 
768
            <c>zlib:inflate</c> failed when the size of the inflated
 
769
            data was an exact multiple of the internal buffer size
 
770
            (4000 bytes by default).</p>
 
771
          <p>
 
772
            Own Id: OTP-7359</p>
 
773
        </item>
 
774
        <item>
 
775
          <p>
 
776
            If the total number of allowed atoms is exceeded, there
 
777
            will now be a controlled termination of the emulator with
 
778
            a crash dump file. The emulator used to simply crash.
 
779
            (Thanks Howard Yeh and Thomas Lindgren.)</p>
 
780
          <p>
 
781
            Own Id: OTP-7372</p>
 
782
        </item>
 
783
        <item>
 
784
          <p>
 
785
            The break handler in werl on Windows could cause the
 
786
            emulator to hang or crash, that is now corrected.</p>
 
787
          <p>
 
788
            Own Id: OTP-7394 Aux Id: seq10969 </p>
 
789
        </item>
 
790
        <item>
 
791
          <p>
 
792
            The configure script now tests for an serious
 
793
            optimization bug in gcc-4.3.0. If the bug is present, the
 
794
            configure script will abort (if this happens, the only
 
795
            way to build Erlang/OTP is to change to another version
 
796
            of gcc). (Thanks to Mikael Pettersson.)</p>
 
797
          <p>
 
798
            Own Id: OTP-7397</p>
 
799
        </item>
 
800
      </list>
 
801
    </section>
 
802
 
 
803
 
 
804
    <section><title>Improvements and New Features</title>
 
805
      <list>
 
806
        <item>
 
807
          <p>
 
808
            On Unix, the emulator now notices when the width of the
 
809
            terminal has changed. (Thanks to Matthew Dempsky and
 
810
            Patrick Mahoney.)</p>
 
811
          <p>
 
812
            Own Id: OTP-7290</p>
 
813
        </item>
 
814
        <item>
 
815
          <p>
 
816
            There is a new function <c>init:stop/1</c> which can be
 
817
            used to shutdown the system cleanly AND generate a
 
818
            non-zero exit status or crash dump. (Thanks to Magnus
 
819
            Froberg.)</p>
 
820
          <p>
 
821
            Own Id: OTP-7308</p>
 
822
        </item>
 
823
        <item>
 
824
          <p>
 
825
            process_info(Pid, garbage_collection) now returns more
 
826
            information</p>
 
827
          <p>
 
828
            Own Id: OTP-7311</p>
 
829
        </item>
 
830
        <item>
 
831
          <p>
 
832
            The <c>hide</c> option for <c>open_port/2</c> is now
 
833
            documented. (Thanks to Richard Carlsson.)</p>
 
834
          <p>
 
835
            Own Id: OTP-7358</p>
 
836
        </item>
 
837
      </list>
 
838
    </section>
 
839
 
 
840
 
 
841
    <section><title>Known Bugs and Problems</title>
 
842
      <list>
 
843
        <item>
 
844
          <p>
 
845
            Floating point arithmetics in drivers can cause a runtime
 
846
            system crash on runtime systems with floating point
 
847
            exceptions enabled. Floating point exceptions are
 
848
            disabled unless explicitly enabled or if hipe is enabled.</p>
 
849
          <p>
 
850
            Own Id: OTP-7237</p>
 
851
        </item>
 
852
      </list>
 
853
    </section>
 
854
 
 
855
</section>
 
856
 
 
857
 
 
858
<section><title>Erts 5.6.2</title>
 
859
 
 
860
    <section><title>Fixed Bugs and Malfunctions</title>
 
861
      <list>
 
862
        <item>
 
863
          <p>
 
864
            The maximum length of an atom of 255 characters is now
 
865
            strictly enforced. <c>binary_to_term/1</c> will now fail
 
866
            with a badarg if an encoded term contains an atom longer
 
867
            than 255 characters. Atoms created by drivers will now be
 
868
            truncated to 255 characters if necessary. (Thanks to
 
869
            Matthew Dempsky.)</p>
 
870
          <p>
 
871
            Own Id: OTP-7147</p>
 
872
        </item>
 
873
        <item>
 
874
          <p>
 
875
            A bug in "bignum handling" on some 64bit architectures
 
876
            could cause rem and div operations on large numbers to
 
877
            hang indefinitely. Rem operations involving the smallest
 
878
            negative number representable in 28 bits or 60 bits could
 
879
            also cause access violation and emulator crash. Both
 
880
            errors are corrected.</p>
 
881
          <p>
 
882
            Own Id: OTP-7177</p>
 
883
        </item>
 
884
        <item>
 
885
          <p>
 
886
            When doing the initial garbage collection after waking a
 
887
            hibernated process, a fullsweep garbage collection was
 
888
            unnecessarily triggered.</p>
 
889
          <p>
 
890
            Own Id: OTP-7212</p>
 
891
        </item>
 
892
        <item>
 
893
            <p>The beta testing module <c>gen_sctp</c> now supports
 
894
            active mode as stated in the documentation. Active mode
 
895
            is still rather untested, and there are some issues about
 
896
            what should be the right semantics for
 
897
            <c>gen_sctp:connect/5</c>. In particular: should it be
 
898
            blocking or non-blocking or choosable. There is a high
 
899
            probability it will change semantics in a (near) future
 
900
            patch.</p> <p>Try it, give comments and send in bug
 
901
            reports!</p>
 
902
          <p>
 
903
            Own Id: OTP-7225</p>
 
904
        </item>
 
905
        <item>
 
906
          <p>
 
907
            Invalid arguments to <c>ets:update_counter/3</c> were not
 
908
            handled correctly. A tuple position (<c>Pos</c>) less
 
909
            than 1 caused the element directly following the key to
 
910
            be updated (as if no position at all had been specified).
 
911
            All invalid values for <c>Pos</c> will now fail with
 
912
            <c>badarg</c>.</p>
 
913
          <p>
 
914
            Own Id: OTP-7226</p>
 
915
        </item>
 
916
        <item>
 
917
          <p>
 
918
            The runtime system with SMP support could under rare
 
919
            circumstances deadlock when a distribution channel was
 
920
            taken down while multiple simultaneous operations were
 
921
            performed on it.</p>
 
922
          <p>
 
923
            Own Id: OTP-7260</p>
 
924
        </item>
 
925
      </list>
 
926
    </section>
 
927
 
 
928
 
 
929
    <section><title>Improvements and New Features</title>
 
930
      <list>
 
931
        <item>
 
932
          <p>
 
933
            More checksum/hash algorithms from the zlib library are
 
934
            now available as built in functions (like md5 hashes has
 
935
            been for a long time).</p>
 
936
          <p>
 
937
            Own Id: OTP-7128</p>
 
938
        </item>
 
939
        <item>
 
940
          <p>
 
941
            Minor improvements in the garbage collector.</p>
 
942
          <p>
 
943
            Own Id: OTP-7139 Aux Id: OTP-7132 </p>
 
944
        </item>
 
945
        <item>
 
946
          <p>
 
947
            The switch "-detached" to the windows werl program now
 
948
            can create an erlang virtual machine without any main
 
949
            window and without a temporary console showing.</p>
 
950
          <p>
 
951
            Own Id: OTP-7142</p>
 
952
        </item>
 
953
        <item>
 
954
            <p><c>erlang:system_info/1</c> now accepts the
 
955
            <c>logical_processors</c>, and <c>debug_compiled</c>
 
956
            arguments. For more info see the, <c>erlang(3)</c>
 
957
            documentation.</p> <p>The scale factor returned by
 
958
            <c>test_server:timetrap_scale_factor/0</c> is now also
 
959
            effected if the emulator uses a larger amount of
 
960
            scheduler threads than the amount of logical processors
 
961
            on the system. </p>
 
962
          <p>
 
963
            Own Id: OTP-7175</p>
 
964
        </item>
 
965
        <item>
 
966
          <p>
 
967
            A new BIF ets:update_element/3. To update individual
 
968
            elements within an ets-tuple, without having to read,
 
969
            update and write back the entire tuple.</p>
 
970
          <p>
 
971
            Own Id: OTP-7200</p>
 
972
        </item>
 
973
        <item>
 
974
          <p>
 
975
            A process executing the <c>processes/0</c> BIF can now be
 
976
            preempted by other processes during its execution. This
 
977
            in order to disturb the rest of the system as little as
 
978
            possible. The returned result is, of course, still a
 
979
            consistent snapshot of existing processes at a time
 
980
            during the call to <c>processes/0</c>.</p>
 
981
          <p>
 
982
            The documentation of the <c>processes/0</c> BIF and the
 
983
            <c>is_process_alive/1</c> BIF have been updated in order
 
984
            to clarify the difference between an existing process and
 
985
            a process that is alive.</p>
 
986
          <p>
 
987
            Own Id: OTP-7213</p>
 
988
        </item>
 
989
      </list>
 
990
    </section>
 
991
 
 
992
</section>
 
993
 
 
994
 
 
995
<section><title>Erts 5.6.1.1</title>
 
996
 
 
997
    <section><title>Fixed Bugs and Malfunctions</title>
 
998
      <list>
 
999
        <item>
 
1000
          <p>
 
1001
            Not enough parameters were passed when sending an error
 
1002
            report in erl_check_io.c (Thanks to Matthew Dempsky).</p>
 
1003
          <p>
 
1004
            Own Id: OTP-7176</p>
 
1005
        </item>
 
1006
        <item>
 
1007
          <p>
 
1008
            In rare circumstances, complex binary matching code could
 
1009
            cause the emulator to crash or not match when it should.
 
1010
            (Thanks to Rory Byrne.)</p>
 
1011
          <p>
 
1012
            Own Id: OTP-7198</p>
 
1013
        </item>
 
1014
      </list>
 
1015
    </section>
 
1016
 
 
1017
 
 
1018
    <section><title>Improvements and New Features</title>
 
1019
      <list>
 
1020
        <item>
 
1021
            <p>The <c>{allocator_sizes, Alloc}</c> and
 
1022
            <c>alloc_util_allocators</c> arguments are now accepted
 
1023
            by <c>erlang:system_info/1</c>. For more information see
 
1024
            the <c>erlang(3)</c> documentation.</p>
 
1025
          <p>
 
1026
            Own Id: OTP-7167</p>
 
1027
        </item>
 
1028
        <item>
 
1029
          <p>
 
1030
            The finishing reallocation of the heap block when
 
1031
            hibernating a process is now always moving the heap block
 
1032
            since it drastically reduces memory fragmentation when
 
1033
            hibernating large amounts of processes.</p>
 
1034
          <p>
 
1035
            Own Id: OTP-7187</p>
 
1036
        </item>
 
1037
      </list>
 
1038
    </section>
 
1039
 
 
1040
</section>
 
1041
 
 
1042
<section><title>Erts 5.6.1</title>
 
1043
 
 
1044
    <section><title>Fixed Bugs and Malfunctions</title>
 
1045
      <list>
 
1046
        <item>
 
1047
          <p>
 
1048
            The SMP emulator on sparc64 erroneously used the sparc32
 
1049
            atomic and the sparc32 spinlock implementations which
 
1050
            caused it to crash.</p>
 
1051
          <p>
 
1052
            Own Id: OTP-7006</p>
 
1053
        </item>
 
1054
        <item>
 
1055
          <p>
 
1056
            Call tracing the new guard BIFs <c>byte_size</c>,
 
1057
            <c>bit_size</c>, or <c>tuple_size</c> and the loading a
 
1058
            module that uses one of those functions, could cause the
 
1059
            emulator to terminate.</p>
 
1060
          <p>
 
1061
            Own Id: OTP-7008</p>
 
1062
        </item>
 
1063
        <item>
 
1064
          <p>
 
1065
            configuring --enable-darwin-universal or
 
1066
            --enable-darwin-64bit on MacOSX could result in a non
 
1067
            optimized emulator. Top level configure script now
 
1068
            corrected.</p>
 
1069
          <p>
 
1070
            Own Id: OTP-7014</p>
 
1071
        </item>
 
1072
        <item>
 
1073
          <p>
 
1074
            configuring --with-gd did not produce correct include
 
1075
            flags for percept.</p>
 
1076
          <p>
 
1077
            Own Id: OTP-7015</p>
 
1078
        </item>
 
1079
        <item>
 
1080
          <p>
 
1081
            Environment variables weren't handled in thread safe
 
1082
            manner in the runtime system with SMP support on Windows.</p>
 
1083
          <p>
 
1084
            <c>erl_drv_putenv()</c>, and <c>erl_drv_getenv()</c> has
 
1085
            been introduced for use in drivers. Do <em>not</em> use
 
1086
            putenv(), or getenv() directly in drivers. For more
 
1087
            information see the <c>erl_driver</c> documentation.</p>
 
1088
          <p>
 
1089
            Own Id: OTP-7035</p>
 
1090
        </item>
 
1091
        <item>
 
1092
          <p>
 
1093
            HIPE: Corrected the choice of interface to the send/3 and
 
1094
            setnode/3 BIFs for native-compiled code. Using the
 
1095
            incorrect interface could, in unusual circumstances, lead
 
1096
            to random runtime errors.</p>
 
1097
          <p>
 
1098
            Own Id: OTP-7067</p>
 
1099
        </item>
 
1100
        <item>
 
1101
          <p>
 
1102
            Garbage collections could become extremely slow when
 
1103
            there were many keys in the process dictionary. (Thanks
 
1104
            to Fredrik Svahn.)</p>
 
1105
          <p>
 
1106
            Own Id: OTP-7068</p>
 
1107
        </item>
 
1108
        <item>
 
1109
          <p>
 
1110
            The duplicate documentation directory in the windows
 
1111
            installation is removed.</p>
 
1112
          <p>
 
1113
            Own Id: OTP-7070</p>
 
1114
        </item>
 
1115
        <item>
 
1116
            <p>Documentation bugfixes and clarifications.</p> (Thanks
 
1117
            to Joern (opendev@gmail.com), Matthias Lang, and Richard
 
1118
            Carlsson.)
 
1119
          <p>
 
1120
            Own Id: OTP-7079</p>
 
1121
        </item>
 
1122
        <item>
 
1123
          <p>
 
1124
            The runtime system with SMP support <em>not</em> using
 
1125
            the native atomic integer implementation part of OTP
 
1126
            could deadlock when run on a system with more than one
 
1127
            logical processor. That is, only the runtime system with
 
1128
            SMP support on <em>other</em> hardware platforms than
 
1129
            x86, x86_64, sparc32, and powerpc32 were effected by this
 
1130
            bug.</p>
 
1131
          <p>
 
1132
            Own Id: OTP-7080</p>
 
1133
        </item>
 
1134
        <item>
 
1135
          <p>
 
1136
            The break handling code (run when Ctrl-C is hit) could
 
1137
            could potentially deadlock the runtime system with SMP
 
1138
            support.</p>
 
1139
          <p>
 
1140
            Own Id: OTP-7104</p>
 
1141
        </item>
 
1142
        <item>
 
1143
          <p>
 
1144
            The sctp driver has been updated to work against newer
 
1145
            lksctp packages e.g 1.0.7 that uses the API spelling
 
1146
            change adaption -> adaptation. Older lksctp (1.0.6) still
 
1147
            work. The erlang API in gen_sctp.erl and inet_sctp.hrl
 
1148
            now spells 'adaptation' regardless of the underlying C
 
1149
            API.</p>
 
1150
          <p>
 
1151
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
1152
          <p>
 
1153
            Own Id: OTP-7120</p>
 
1154
        </item>
 
1155
        <item>
 
1156
            <p>A bug in <c>erlang:phash2/1</c> on 64-bit platforms
 
1157
            has been fixed. (Thanks to Scott Lystig Fritchie.)</p>
 
1158
          <p>
 
1159
            Own Id: OTP-7127</p>
 
1160
        </item>
 
1161
        <item>
 
1162
          <p>
 
1163
            The emulator could under rare circumstances crash while
 
1164
            garbage collecting.</p>
 
1165
          <p>
 
1166
            Own Id: OTP-7132</p>
 
1167
        </item>
 
1168
      </list>
 
1169
    </section>
 
1170
 
 
1171
 
 
1172
    <section><title>Improvements and New Features</title>
 
1173
      <list>
 
1174
        <item>
 
1175
            <p>The documentation has been updated so as to reflect
 
1176
            the last updates of the Erlang shell as well as the minor
 
1177
            modifications of the control sequence <c>p</c> of the
 
1178
            <c>io_lib</c> module.</p> <p>Superfluous empty lines have
 
1179
            been removed from code examples and from Erlang shell
 
1180
            examples.</p>
 
1181
          <p>
 
1182
            Own Id: OTP-6944 Aux Id: OTP-6554, OTP-6911 </p>
 
1183
        </item>
 
1184
        <item>
 
1185
          <p>
 
1186
            Bit syntax construction with a small integer in a
 
1187
            non-byte aligned field wider than the CPU's word size
 
1188
            could cause garbage bits in the beginning of the field.</p>
 
1189
          <p>
 
1190
            Own Id: OTP-7085</p>
 
1191
        </item>
 
1192
        <item>
 
1193
          <p>
 
1194
            All Windows versions older than Windows 2000 are now
 
1195
            <em>not supported</em> by the Erlang runtime system. This
 
1196
            since there was a need for usage of features introduced
 
1197
            in Windows 2000.</p>
 
1198
          <p>
 
1199
            Own Id: OTP-7086</p>
 
1200
        </item>
 
1201
        <item>
 
1202
            <p>Memory management improvements especially for the
 
1203
            runtime system with SMP support:</p> <list> <item> The
 
1204
            runtime system with SMP support can now use multiple,
 
1205
            thread specific instances of most memory allocators. This
 
1206
            improves performance since it reduces lock contention in
 
1207
            the memory allocators. It may however increase memory
 
1208
            usage for some applications. The runtime system with SMP
 
1209
            support will by default enable this feature on most
 
1210
            allocators. The amount of instances used can be
 
1211
            configured. </item> <item> <c>driver_alloc()</c>,
 
1212
            <c>driver_realloc()</c>, and <c>driver_free()</c> now use
 
1213
            their own erts specific memory allocator instead of the
 
1214
            default <c>malloc()</c> implementation on the system.
 
1215
            </item> <item> The default configuration of some
 
1216
            allocators have been changed to fit applications that use
 
1217
            much memory better. </item> <item> Some new
 
1218
            <c>erts_alloc</c> configuration parameters have been
 
1219
            added. </item> <item> <c>erts_alloc_config</c> has been
 
1220
            modified to be able to create configurations suitable for
 
1221
            multiple instances of allocators. </item> <item> The
 
1222
            returned value from <c>erlang:system_info({allocator,
 
1223
            Alloc})</c> has been changed. This since an allocator may
 
1224
            now run in multiple instances. </item> </list> <p>If you
 
1225
            for some reason want the memory allocators to be
 
1226
            configured as before, you can pass the <c>+Mea r11b</c>
 
1227
            command-line argument to <c>erl</c>.</p> <p>For more
 
1228
            information see the <c>erts_alloc(3)</c>, the
 
1229
            <c>erts_alloc_config(3)</c>, and the <c>erlang(3)</c>
 
1230
            documentation.</p>
 
1231
          <p>
 
1232
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
1233
          <p>
 
1234
            Own Id: OTP-7100</p>
 
1235
        </item>
 
1236
        <item>
 
1237
          <p>
 
1238
            On Unix, denormalized floating point numbers could not be
 
1239
            created using <c>list_to_float/1</c> or
 
1240
            <c>binary_to_term/1</c>. (Thanks to Matthew Dempsky.)</p>
 
1241
          <p>
 
1242
            Own Id: OTP-7122</p>
 
1243
        </item>
 
1244
        <item>
 
1245
          <p>
 
1246
            Native atomic integers and spin-locks are now also
 
1247
            available for the runtime system with SMP support on
 
1248
            sparc64.</p>
 
1249
          <p>
 
1250
            Own Id: OTP-7130</p>
 
1251
        </item>
 
1252
        <item>
 
1253
          <p>
 
1254
            FP exceptions support for sparc64 userspace on Linux has
 
1255
            been added. Note that FP exception support is now turned
 
1256
            off by default, so to actually enable it you need to do
 
1257
            '<c>./configure --enable-fp-exceptions</c>'.</p>
 
1258
          <p>
 
1259
            Own Id: OTP-7131</p>
 
1260
        </item>
 
1261
      </list>
 
1262
    </section>
 
1263
 
 
1264
</section>
 
1265
 
 
1266
<section><title>Erts 5.6</title>
 
1267
 
 
1268
    <section><title>Fixed Bugs and Malfunctions</title>
 
1269
      <list>
 
1270
        <item>
 
1271
          <p>
 
1272
            A bug for raw files when reading 0 bytes returning 'eof'
 
1273
            instead of empty data has been corrected.</p>
 
1274
          <p>
 
1275
            Own Id: OTP-6291 Aux Id: OTP-6967 </p>
 
1276
        </item>
 
1277
        <item>
 
1278
          <p>
 
1279
            All exported functions in gzio.c have now been renamed to
 
1280
            avoid conflict with drivers that are indirectly linked
 
1281
            with an external zlib library.</p>
 
1282
          <p>
 
1283
            Own Id: OTP-6816 Aux Id: OTP-6591 </p>
 
1284
        </item>
 
1285
        <item>
 
1286
          <p>
 
1287
            On the 64-bit Erlang emulator, bit syntax construction
 
1288
            with integers containing more than 60 bits ("big
 
1289
            numbers") into fields with more than 60 bits could
 
1290
            produce incorrect results.</p>
 
1291
          <p>
 
1292
            Own Id: OTP-6833</p>
 
1293
        </item>
 
1294
        <item>
 
1295
          <p>
 
1296
            When the runtime system failed to allocate memory for
 
1297
            binaries, it could dead lock while writing the
 
1298
            <c>erl_crash.dump</c>.</p>
 
1299
          <p>
 
1300
            Own Id: OTP-6848</p>
 
1301
        </item>
 
1302
        <item>
 
1303
          <p>
 
1304
            The runtime system with SMP support could deadlock if a
 
1305
            process called the <c>erlang:suspend_process(Pid)</c> BIF
 
1306
            or the <c>erlang:garbage_collect(Pid)</c> BIF while the
 
1307
            process identified by <c>Pid</c> was currently running
 
1308
            and the process calling the BIFs was terminated during
 
1309
            the call to the BIFs.</p>
 
1310
          <p>
 
1311
            Processes suspending each other via the
 
1312
            <c>erlang:suspend_process/1</c> BIF or garbage collecting
 
1313
            each other via the <c>erlang:garbage_collect/1</c> BIF
 
1314
            could deadlock each other when the runtime system with
 
1315
            SMP support was used.</p>
 
1316
          <p>
 
1317
            Own Id: OTP-6920</p>
 
1318
        </item>
 
1319
        <item>
 
1320
          <p>
 
1321
            <c>dbg</c> could leave traced processes in a suspended
 
1322
            state if the tracer process was killed with exit reason
 
1323
            <c>kill</c>.</p>
 
1324
          <p>
 
1325
            <c>erlang:suspend_process/2</c> has been introduced which
 
1326
            accepts an option list as second argument. For more
 
1327
            information see the <c>erlang(3)</c> documentation.</p>
 
1328
          <p>
 
1329
            Processes suspended via
 
1330
            <c>erlang:suspend_process/[1,2]</c> will now be
 
1331
            automatically resumed if the process that called
 
1332
            <c>erlang:suspend_process/[1,2]</c> terminates.</p>
 
1333
          <p>
 
1334
            Processes could previously be suspended by one process
 
1335
            and resumed by another unless someone was tracing the
 
1336
            suspendee. This is <em>not</em> possible anymore. The
 
1337
            process resuming a process <em>has</em> to be the one
 
1338
            that suspended it.</p>
 
1339
          <p>
 
1340
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
1341
          <p>
 
1342
            Own Id: OTP-6946</p>
 
1343
        </item>
 
1344
        <item>
 
1345
            <p>file:write_file/3, file:write/2 and file:read/2 could
 
1346
            crash (contrary to documentation) for odd enough file
 
1347
            system problems, e.g write to full file system. This bug
 
1348
            has now been corrected.</p> <p>In this process the file
 
1349
            module has been rewritten to produce better error codes.
 
1350
            Posix error codes now originate from the OS file system
 
1351
            calls or are generated only for very similar causes (for
 
1352
            example 'enomem' is generated if a memory allocation
 
1353
            fails, and 'einval' is generated if the file handle in
 
1354
            Erlang is a file handle but currently invalid).</p>
 
1355
            <p>More Erlang-ish error codes are now generated. For
 
1356
            example <c>{error,badarg}</c> is now returned from
 
1357
            <c>file:close/1</c> if the argument is not of a file
 
1358
            handle type. See file(3).</p> <p>The possibility to write
 
1359
            a single byte using <c>file:write/2</c> instead of a list
 
1360
            or binary of one byte, contradictory to the
 
1361
            documentation, has been removed.</p>
 
1362
          <p>
 
1363
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
1364
          <p>
 
1365
            Own Id: OTP-6967 Aux Id: OTP-6597 OTP-6291 </p>
 
1366
        </item>
 
1367
        <item>
 
1368
          <p>
 
1369
            Monitor messages produced by the system monitor
 
1370
            functionality, and garbage collect trace messages could
 
1371
            contain erroneous heap and/or stack sizes when the actual
 
1372
            heaps and/or stacks were huge.</p>
 
1373
          <p>
 
1374
            As of erts version 5.6 the <c>large_heap</c> option to
 
1375
            <c>erlang:system_monitor/[1,2]</c> has been modified. The
 
1376
            monitor message is sent if the sum of the sizes of all
 
1377
            memory blocks allocated for all heap generations is equal
 
1378
            to or larger than the specified size. Previously the
 
1379
            monitor message was sent if the memory block allocated
 
1380
            for the youngest generation was equal to or larger than
 
1381
            the specified size.</p>
 
1382
          <p>
 
1383
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
1384
          <p>
 
1385
            Own Id: OTP-6974 Aux Id: seq10796 </p>
 
1386
        </item>
 
1387
        <item>
 
1388
          <p>
 
1389
            <c>inet:getopts/2</c> returned random values on Windows
 
1390
            Vista.</p>
 
1391
          <p>
 
1392
            Own Id: OTP-7003</p>
 
1393
        </item>
 
1394
      </list>
 
1395
    </section>
 
1396
 
 
1397
 
 
1398
    <section><title>Improvements and New Features</title>
 
1399
      <list>
 
1400
        <item>
 
1401
          <p>
 
1402
            The emulator internal process lock implementation has
 
1403
            been rewritten and optimized. A slight risk of starvation
 
1404
            existed in the previous implementation. This risk has
 
1405
            also been eliminated in the new implementation.</p>
 
1406
          <p>
 
1407
            Own Id: OTP-6500</p>
 
1408
        </item>
 
1409
        <item>
 
1410
          <p>
 
1411
            Bitstrings (bit-level) binaries and binary comprehensions
 
1412
            are now part of the language. See the Reference Manual.</p>
 
1413
          <p>
 
1414
            Own Id: OTP-6558</p>
 
1415
        </item>
 
1416
        <item>
 
1417
          <p>
 
1418
            The windows version of erlang now has SMP support. The
 
1419
            SMP emulator is run by default on machines which shows
 
1420
            more than one virtual or physical processor.</p>
 
1421
          <p>
 
1422
            Own Id: OTP-6560 Aux Id: OTP-6925 </p>
 
1423
        </item>
 
1424
        <item>
 
1425
          <p>
 
1426
            The details of the compressed term format has been
 
1427
            documented in erl_ext_dist.txt. (Thanks to Daniel
 
1428
            Goertzen.)</p>
 
1429
          <p>
 
1430
            Own Id: OTP-6755</p>
 
1431
        </item>
 
1432
        <item>
 
1433
          <p>
 
1434
            The runtime system with SMP support is now started by
 
1435
            default if more than one logical processor are detected.
 
1436
            For more information, see the <c>erl(3)</c>
 
1437
            documentation.</p>
 
1438
          <p>
 
1439
            Own Id: OTP-6756</p>
 
1440
        </item>
 
1441
        <item>
 
1442
          <p>
 
1443
            The external format for Erlang terms and the distribution
 
1444
            protocol are now documented in ERTS User's Guide.</p>
 
1445
          <p>
 
1446
            Own Id: OTP-6779</p>
 
1447
        </item>
 
1448
        <item>
 
1449
          <p>
 
1450
            New BIF's erlang:system_profile/1 and
 
1451
            erlang:system_profile/2. These BIF's controls concurrency
 
1452
            profiling options for processes, ports and schedulers.</p>
 
1453
          <p>
 
1454
            Own Id: OTP-6783 Aux Id: OTP-6285 </p>
 
1455
        </item>
 
1456
        <item>
 
1457
          <p>
 
1458
            The <c>ErlDrvTermData</c> term types used by
 
1459
            <c>driver_output_term()</c> and <c>driver_send_term()</c>
 
1460
            have been extended with the term types
 
1461
            <c>ERL_DRV_BUF2BINARY</c>, <c>ERL_DRV_EXT2TERM</c>, and
 
1462
            <c>ERL_DRV_UINT</c>. <c>ERL_DRV_BUF2BINARY</c> is used
 
1463
            for passing and creating a binary,
 
1464
            <c>ERL_DRV_EXT2TERM</c> is used for passing terms encoded
 
1465
            with the external term format, and <c>ERL_DRV_UINT</c> is
 
1466
            used for passing unsigned integers.</p>
 
1467
          <p>
 
1468
            Also the data types <c>ErlDrvUInt</c> and
 
1469
            <c>ErlDrvSInt</c> have been added which makes it more
 
1470
            obvious how arguments to term types are interpreted with
 
1471
            regards to width and signedness.</p>
 
1472
          <p>
 
1473
            The incorrect data types <c>ErlDriverTerm</c>,
 
1474
            <c>ErlDriverBinary</c>, and <c>ErlDriverPort</c> in the
 
1475
            <c>erl_driver(3)</c> documentation have been replaced
 
1476
            with the correct data types <c>ErlDrvTermData</c>,
 
1477
            <c>ErlDrvBinary</c>, and <c>ErlDrvPort</c>.</p>
 
1478
          <p>
 
1479
            For more information see the <c>erl_driver(3)</c>
 
1480
            documentation.</p>
 
1481
          <p>
 
1482
            Own Id: OTP-6823</p>
 
1483
        </item>
 
1484
        <item>
 
1485
          <p>
 
1486
            Miscellaneous improvements of the erts internal thread
 
1487
            library.</p>
 
1488
          <p>
 
1489
            It now support optimized atomic operations and spin-locks
 
1490
            on windows.</p>
 
1491
          <p>
 
1492
            Fall-backs based on mutexes and/or spin-locks for missing
 
1493
            optimized atomic operations, spin-locks, or rwlocks has
 
1494
            been implemented. This makes it possible to compile the
 
1495
            runtime system with SMP support on a lot more platforms.</p>
 
1496
          <p>
 
1497
            Default stack size on OpenBSD has been increased to 256
 
1498
            kilo-words.</p>
 
1499
          <p>
 
1500
            Own Id: OTP-6831 Aux Id: OTP-6560 </p>
 
1501
        </item>
 
1502
        <item>
 
1503
            <p>Many bit syntax operations, both construction and
 
1504
            matching, are faster. For further information, see the
 
1505
            Efficiency Guide.</p>
 
1506
          <p>
 
1507
            Own Id: OTP-6838</p>
 
1508
        </item>
 
1509
        <item>
 
1510
            <p>Literal lists, tuples, and binaries are no longer
 
1511
            constructed at run-time as they used to be, but are
 
1512
            stored in a per-module constant pool. Literals that are
 
1513
            used more than once are stored only once.</p>
 
1514
            <p>This is not a change to the language, only in the
 
1515
            details of its implementation. Therefore, the
 
1516
            implications of this change is described in the
 
1517
            Efficiency Guide.</p>
 
1518
            <p>Example 1: In the expression <c>element(BitNum-1,
 
1519
            {1,2,4,8,16,32,64,128})</c>, the tuple used to be
 
1520
            constructed every time the expression was executed, which
 
1521
            could be detrimental to performance in two ways if the
 
1522
            expression was executed in a loop: the time to build the
 
1523
            tuple itself and the time spent in garbage collections
 
1524
            because the heap filled up with garbage faster.</p>
 
1525
            <p>Example 2: Literal strings, such as <c>"abc"</c>, used
 
1526
            to be stored in the compiled code compactly as a byte
 
1527
            string and expanded to a list at run-time. Now all
 
1528
            strings will be stored expanded to lists (such as
 
1529
            <c>[$a,$b,$c]</c>) in the constant pool. That means that
 
1530
            the string will be faster to use at run-time, but that it
 
1531
            will require more space even when not used. If space is
 
1532
            an issue, you might want to use binary literals (that is,
 
1533
            <c>&lt;&lt;"abc"&gt;&gt;</c>) instead of string literals for
 
1534
            infrequently used long strings (such as error
 
1535
            messages).</p>
 
1536
          <p>
 
1537
            Own Id: OTP-6850</p>
 
1538
        </item>
 
1539
        <item>
 
1540
            <p>The Erlang driver API has been extended with a
 
1541
            portable POSIX thread like API for multi-threading. The
 
1542
            Erlang driver thread API provides:</p> <list>
 
1543
            <item>Threads</item> <item>Mutexes</item> <item>Condition
 
1544
            variables</item> <item>Read/Write locks</item>
 
1545
            <item>Thread specific data</item> </list> <p>For more
 
1546
            information see the <c>erl_driver(3)</c>
 
1547
            documentation.</p>
 
1548
          <p>
 
1549
            Own Id: OTP-6857</p>
 
1550
        </item>
 
1551
        <item>
 
1552
          <p>
 
1553
            Recursive calls now usually consume less stack than in
 
1554
            R11B. See the Efficiency Guide.</p>
 
1555
          <p>
 
1556
            Own Id: OTP-6862 Aux Id: seq10746 </p>
 
1557
        </item>
 
1558
        <item>
 
1559
          <p>
 
1560
            The deprecated BIFs <c>erlang:old_binary_to_term/1</c>
 
1561
            and <c>erlang:info/1</c> have been removed.</p>
 
1562
          <p>
 
1563
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
1564
          <p>
 
1565
            Own Id: OTP-6876</p>
 
1566
        </item>
 
1567
        <item>
 
1568
          <p>
 
1569
            Calls to driver call-backs triggered by external events
 
1570
            are now scheduled and interleaved with execution of
 
1571
            Erlang processes also on the runtime system without SMP
 
1572
            support.</p>
 
1573
          <p>
 
1574
            Own Id: OTP-6878</p>
 
1575
        </item>
 
1576
        <item>
 
1577
          <p>
 
1578
            Faster arithmetic of integers of more than 27 bits signed
 
1579
            (or 60 bits signed on an 64-bit CPU), and also faster
 
1580
            integer multiplication. (Thanks to Tony Rogvall.)</p>
 
1581
          <p>
 
1582
            Own Id: OTP-6891</p>
 
1583
        </item>
 
1584
        <item>
 
1585
            <p>Significant improvements of the <c>process_info</c>
 
1586
            BIFs:</p> <list> <item> <c>process_info/2</c> can now be
 
1587
            called with a list of items as second argument in order
 
1588
            to atomically retrieve information about multiple items.
 
1589
            </item> <item> <c>process_info/[1,2]</c> has been
 
1590
            optimized in the runtime system with SMP support. The
 
1591
            whole scheduler could previously be blocked for a
 
1592
            significant period of time in <c>process_info/[1,2]</c>
 
1593
            waiting for a lock on the process being inspected. The
 
1594
            Erlang process calling <c>process_info/[1,2]</c> can
 
1595
            still be blocked for a significant period of time waiting
 
1596
            for the lock, but the scheduler will now be able to run
 
1597
            other processes while the process calling
 
1598
            <c>process_info/[1,2]</c> waits for the lock. </item>
 
1599
            <item> <c>process_info/2</c> now accept a few more items
 
1600
            than before. </item> <item> The documentation of
 
1601
            <c>process_info/[1,2]</c> has been improved. </item>
 
1602
            </list> <p>For more information see the <c>erlang(3)</c>
 
1603
            documentation.</p>
 
1604
          <p>
 
1605
            Own Id: OTP-6899</p>
 
1606
        </item>
 
1607
        <item>
 
1608
          <p>
 
1609
            <c>open_port({}, [])</c> could crash the emulator.
 
1610
            (Thanks to Matthew Dempsky.)</p>
 
1611
          <p>
 
1612
            Own Id: OTP-6901</p>
 
1613
        </item>
 
1614
        <item>
 
1615
            <p>Two new guard BIFs have been introduced as a
 
1616
            recommended replacement for <c>size/1</c>. (The
 
1617
            <c>size/1</c> BIF will be removed no earlier than in
 
1618
            R14B.) The BIFs are <c>tuple_size/1</c> to calculate the
 
1619
            size of a tuple and <c>byte_size/1</c> to calculate the
 
1620
            number of bytes needed for the contents of the binary or
 
1621
            bitstring (rounded up to the nearest number of bytes if
 
1622
            necessary).</p>
 
1623
            <p>There is also a new <c>bit_size/1</c> BIF that returns
 
1624
            the exact number of bits that a binary or bitstring
 
1625
            contains.</p>
 
1626
          <p>
 
1627
            Own Id: OTP-6902</p>
 
1628
        </item>
 
1629
        <item>
 
1630
            <p>The <c>ets:fixtable/2</c> function, which has been
 
1631
            deprecated for several releases, has been removed.</p>
 
1632
            <p>The <c>ets:info/1</c> function has been reimplemented
 
1633
            as a BIF, which guarantees that information returned is
 
1634
            consistent.</p>
 
1635
            <p>The <c>ets:info/2</c> function now fails with reason
 
1636
            <c>badarg</c> if the second argument is invalid.
 
1637
            (Dialyzer can be used to find buggy code where the second
 
1638
            argument is misspelled.)</p>
 
1639
          <p>
 
1640
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
1641
          <p>
 
1642
            Own Id: OTP-6906</p>
 
1643
        </item>
 
1644
        <item>
 
1645
          <p>
 
1646
            As the linux kernel may generate a minor fault when
 
1647
            tracing with CPU timestamps, and there exists no patch to
 
1648
            the Linux kernel that fixes the problem, cpu timestamps
 
1649
            are disabled on Linux for now.</p>
 
1650
          <p>
 
1651
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
1652
          <p>
 
1653
            Own Id: OTP-6922</p>
 
1654
        </item>
 
1655
        <item>
 
1656
            <p>The functions io:columns/0, io:columns/1, io:rows/0
 
1657
            and io:rows/1 are added to allow the user to get
 
1658
            information about the terminal geometry. The shell takes
 
1659
            some advantage of this when formatting output. For
 
1660
            regular files and other io-devices where height and width
 
1661
            are not applicable, the functions return
 
1662
            {error,enotsup}.</p>
 
1663
            <p>Potential incompatibility: If one has written a custom
 
1664
            io-handler, the handler has to either return an error or
 
1665
            take care of io-requests regarding terminal height and
 
1666
            width. Usually that is no problem as io-handlers, as a
 
1667
            rule of thumb, should give an error reply when receiving
 
1668
            unknown io-requests, instead of crashing.</p>
 
1669
          <p>
 
1670
            *** POTENTIAL INCOMPATIBILITY ***</p>
 
1671
          <p>
 
1672
            Own Id: OTP-6933</p>
 
1673
        </item>
 
1674
        <item>
 
1675
          <p>
 
1676
            <c>driver_caller()</c> can now also be used from the
 
1677
            <c>start</c> callback of a driver.</p>
 
1678
          <p>
 
1679
            Own Id: OTP-6951</p>
 
1680
        </item>
 
1681
        <item>
 
1682
          <p>
 
1683
            The emulator can now be compiled for 64bit intel, as well
 
1684
            as a 32bit universal binary on darwin/MacOSX 10.4 and
 
1685
            10.5.</p>
 
1686
          <p>
 
1687
            Own Id: OTP-6961</p>
 
1688
        </item>
 
1689
        <item>
 
1690
          <p>
 
1691
            If <c>open_port</c> fails because all available ports are
 
1692
            already in use, it will now throw a <c>system_limit</c>
 
1693
            exception instead of an <c>enfile</c> exception.
 
1694
            (<c>enfile</c> might still be thrown if the operating
 
1695
            system would return ENFILE.)</p>
 
1696
          <p>
 
1697
            Own Id: OTP-6968</p>
 
1698
        </item>
 
1699
        <item>
 
1700
          <p>
 
1701
            The <c>spawn_monitor/1</c> and <c>spawn_monitor/3</c> BIFs
 
1702
            are now auto-imported (i.e. they no longer need an
 
1703
            <c>erlang:</c> prefix).</p>
 
1704
          <p>
 
1705
            Own Id: OTP-6975</p>
 
1706
        </item>
 
1707
        <item>
 
1708
          <p>
 
1709
            On Windows, the werl window now handles resize, so that
 
1710
            the whole window can be utilized. Text selection is also
 
1711
            updated to be line oriented instead of rectangle oriented
 
1712
            as in earlier versions.</p>
 
1713
          <p>
 
1714
            Own Id: OTP-6994 Aux Id: OTP-6933 </p>
 
1715
        </item>
 
1716
        <item>
 
1717
          <p>
 
1718
            Kqueue support (kernel-poll) has been enabled on FreeBSD.
 
1719
            The problem with kqueue not detecting writes on a pipe on
 
1720
            FreeBSD was actually not a kqueue issue, but a writev on
 
1721
            pipes issue. Neither poll(), nor select() detected the
 
1722
            write when the bug hit. NetBSD and DragonFlyBSD probably
 
1723
            have or have had the same bug. This bug should have been
 
1724
            fixed in FreeBSD 6.3 and FreeBSD 7.0 thanks to
 
1725
            Jean-Sebastien Pedron.</p>
 
1726
          <p>
 
1727
            Own Id: OTP-7001</p>
 
1728
        </item>
 
1729
      </list>
 
1730
    </section>
 
1731
 
 
1732
</section>
 
1733
 
 
1734
 
 
1735
<section><title>Erts 5.5.5.5</title>
 
1736
 
 
1737
    <section><title>Fixed Bugs and Malfunctions</title>
 
1738
      <list>
 
1739
        <item>
 
1740
          <p>
 
1741
            Hanging writes on temporarilly unavailable NFS
 
1742
            filesystems could cause the execution of (not file
 
1743
            related) erlang code to get blocked even though I/O
 
1744
            threads were used. This is now corrected.</p>
 
1745
          <p>
 
1746
            Own Id: OTP-6907 Aux Id: seq10771 </p>
 
1747
        </item>
 
1748
      </list>
 
1749
    </section>
 
1750
 
 
1751
</section>
 
1752
 
 
1753
<section><title>Erts 5.5.5.4</title>
 
1754
 
 
1755
    <section><title>Fixed Bugs and Malfunctions</title>
 
1756
      <list>
 
1757
        <item>
 
1758
          <p>
 
1759
            Data passed to a driver via <c>erlang:port_call</c> could
 
1760
            be corrupted when the runtime system with SMP support was
 
1761
            used. (Thanks to YAMASHINA Hio.)</p>
 
1762
          <p>
 
1763
            Own Id: OTP-6879</p>
 
1764
        </item>
 
1765
        <item>
 
1766
          <p>
 
1767
            In the SMP emulator, if serveral processes called
 
1768
            ets:update_counter/3 (even for different tables) when the
 
1769
            counter values exceeded 27 bits, the counter values could
 
1770
            be corrupted or the emulator could crash.</p>
 
1771
          <p>
 
1772
            Own Id: OTP-6880 Aux Id: seq10760 </p>
 
1773
        </item>
 
1774
      </list>
 
1775
    </section>
 
1776
 
 
1777
</section>
 
1778
 
 
1779
 
 
1780
<section><title>Erts 5.5.5.3</title>
 
1781
 
 
1782
    <section><title>Fixed Bugs and Malfunctions</title>
 
1783
      <list>
 
1784
        <item>
 
1785
            <p>Creating a named table using <c>ets:new/2</c> or
 
1786
            renaming a named table using <c>ets:rename/2</c> could in
 
1787
            rare circumstances succed, meaning that there would be
 
1788
            two or more tables with the same name. Now such call will
 
1789
            fail with a <c>badarg</c> exception as it is supposed to
 
1790
            do.</p>
 
1791
            <p><c>ets:delete/1</c> used on a named table now removes
 
1792
            the name immediately so that a new table with the same
 
1793
            name can be created.</p>
 
1794
            <p>Turning on call trace on the internal BIF that
 
1795
            implements <c>ets:delete/1</c> would crash the
 
1796
            emulator.</p>
 
1797
            <p>SMP emulator only: Using <c>ets:rename/2</c> on a
 
1798
            table that <c>ets:safe_fixtable/2</c> has been used on
 
1799
            could casue an emulator crash or undefined behaviour
 
1800
            because of a missing lock.</p>
 
1801
          <p>
 
1802
            Own Id: OTP-6872 Aux Id: seq10756, seq10757 </p>
 
1803
        </item>
 
1804
      </list>
 
1805
    </section>
 
1806
 
 
1807
</section>
 
1808
 
 
1809
<section><title>Erts 5.5.5.2</title>
 
1810
 
 
1811
    <section><title>Known Bugs and Problems</title>
 
1812
      <list>
 
1813
        <item>
 
1814
          <p>
 
1815
            ets:select/3 on ordered_set and with a chunksize a
 
1816
            multiple of 1000 gave all elements instead of just 1000.
 
1817
            Also ets:slot/2 on ordered set could give unexpected
 
1818
            results on SMP emulator. Both problems are corrected.</p>
 
1819
          <p>
 
1820
            Own Id: OTP-6842</p>
 
1821
        </item>
 
1822
      </list>
 
1823
    </section>
 
1824
 
 
1825
</section>
 
1826
 
 
1827
<section><title>Erts 5.5.5.1</title>
 
1828
 
 
1829
    <section><title>Fixed Bugs and Malfunctions</title>
 
1830
      <list>
 
1831
        <item>
 
1832
          <p>
 
1833
            All exported functions in gzio.c have now been renamed to
 
1834
            avoid conflict with drivers that are indirectly linked
 
1835
            with an external zlib library.</p>
 
1836
          <p>
 
1837
            Own Id: OTP-6816 Aux Id: OTP-6591 </p>
 
1838
        </item>
 
1839
        <item>
 
1840
          <p>
 
1841
            Calling binary_to_term/1 with certain invalid binaries
 
1842
            would crash the emulator.</p>
 
1843
          <p>
 
1844
            Own Id: OTP-6817</p>
 
1845
        </item>
 
1846
      </list>
 
1847
    </section>
 
1848
 
 
1849
 
 
1850
    <section><title>Improvements and New Features</title>
 
1851
      <list>
 
1852
        <item>
 
1853
          <p>
 
1854
            Restored speed of bit-syntax matching of 32 bits
 
1855
            integers.</p>
 
1856
          <p>
 
1857
            Own Id: OTP-6789 Aux Id: seq10688 </p>
 
1858
        </item>
 
1859
      </list>
 
1860
    </section>
 
1861
 
 
1862
</section>
 
1863
 
 
1864
  <section>
 
1865
    <title>Erts 5.5.5</title>
 
1866
 
 
1867
    <section>
 
1868
      <title>Fixed Bugs and Malfunctions</title>
 
1869
      <list type="bulleted">
 
1870
        <item>
 
1871
          <p>The functions in gzio.c have been renamed to avoid
 
1872
            conflict with drivers that indirectly linked with an
 
1873
            external zlib library.</p>
 
1874
          <p>Own Id: OTP-6591</p>
 
1875
        </item>
 
1876
        <item>
 
1877
          <p>The emulator without SMP support dumped core if an
 
1878
            async-thread finished a job after the emulator had begun
 
1879
            writing an <c><![CDATA[erl_crash.dump]]></c>. </p>
 
1880
          <p>Own Id: OTP-6685</p>
 
1881
        </item>
 
1882
        <item>
 
1883
          <p>In bit syntax matching, integer fields with greater
 
1884
            size than 16Mb would fail to match. (Thanks to Bertil
 
1885
            Karlsson and Francesco Pierfederici.)</p>
 
1886
          <p>Matching out a 32-bit integer not aligned on a byte
 
1887
            boundary from a binary could cause an heap overflow (and
 
1888
            subsequent termination of the emulator).</p>
 
1889
          <p>A module that contained bit syntax construction with a
 
1890
            literal field size greater than 16Mb would fail to
 
1891
            load.</p>
 
1892
          <p>Several other similar bugs having to do with huge
 
1893
            field sizes were eliminated.</p>
 
1894
          <p>Attempting to construct a binary longer than 536870911
 
1895
            bytes will now fail with a <c><![CDATA[system_limit]]></c> exception
 
1896
            (rather than fail in mysterious ways or construct an
 
1897
            binary with incorrect contents). Similarily, attempting
 
1898
            to match a binary longer than 536870911 bytes will now
 
1899
            fail (instead of producing an incorrect result). This
 
1900
            limitation has been documented in the Efficiency Guide.
 
1901
            (The limit is in the 32-bit emulator; use the 64-bit
 
1902
            emulator if you need to handle larger binaries than
 
1903
            536870911.)</p>
 
1904
          <p>Own Id: OTP-6686</p>
 
1905
        </item>
 
1906
        <item>
 
1907
          <p>Bugs in rem and div of very large numbers are corrected.</p>
 
1908
          <p>Own Id: OTP-6692</p>
 
1909
        </item>
 
1910
        <item>
 
1911
          <p><c><![CDATA[erlang:system_info({allocator, Alloc})]]></c> didn't
 
1912
            allocate enough heap when a bignum was part of the result
 
1913
            which could cause an emulator crash.</p>
 
1914
          <p>Own Id: OTP-6693</p>
 
1915
        </item>
 
1916
        <item>
 
1917
          <p>It was previously not possible to pass
 
1918
            <c><![CDATA[erts_alloc]]></c> the same configuration via the
 
1919
            command-line, as used by default. </p>
 
1920
          <p>A <c><![CDATA[+M*]]></c> command-line argument that configure a
 
1921
            size of some sort can now be passed a value that equals
 
1922
            the size of the address space. The value used, in this
 
1923
            case, will be <c><![CDATA["the size of the address space" - 1]]></c>.</p>
 
1924
          <p>Own Id: OTP-6699</p>
 
1925
        </item>
 
1926
        <item>
 
1927
          <p><c><![CDATA[SysIOVec* driver_peekq(ErlDrvPort port, int *vlen)]]></c> did not update <c><![CDATA[*vlen]]></c> if <c><![CDATA[port]]></c> was
 
1928
            invalid. <c><![CDATA[*vlen]]></c> is now set to <c><![CDATA[-1]]></c> if the
 
1929
            <c><![CDATA[port]]></c> is invalid.</p>
 
1930
          <p>The <c><![CDATA[efile]]></c> driver
 
1931
            expects <c><![CDATA[*vlen]]></c> to be updated also when the
 
1932
            <c><![CDATA[port]]></c> is invalid. This situation occurs seldom, but
 
1933
            when the runtime system has async-threads enabled and
 
1934
            ports are killed it can. When it occured the runtime
 
1935
            system crashed.</p>
 
1936
          <p>Own Id: OTP-6729</p>
 
1937
        </item>
 
1938
      </list>
 
1939
    </section>
 
1940
 
 
1941
    <section>
 
1942
      <title>Improvements and New Features</title>
 
1943
      <list type="bulleted">
 
1944
        <item>
 
1945
          <p>For scripts written using <c><![CDATA[escript]]></c>, there is a new
 
1946
            function <c><![CDATA[escript:script_name/0]]></c>, which can be used
 
1947
            to retrieve the pathame of the script. The documentation
 
1948
            has been clarified regarding pre-defined macros such as
 
1949
            ?MODULE and the module name.</p>
 
1950
          <p>Own Id: OTP-6593</p>
 
1951
        </item>
 
1952
        <item>
 
1953
          <p>The section Guards in the chapter The Abstract Format
 
1954
            of the ERTS User's Guide has been updated.</p>
 
1955
          <p>Own Id: OTP-6600</p>
 
1956
        </item>
 
1957
        <item>
 
1958
          <p>Corrected protocol layer flue for socket options
 
1959
            SO_LINGER, SO_SNDBUF and SO_RCVBUF, for SCTP.</p>
 
1960
          <p>Own Id: OTP-6625 Aux Id: OTP-6336 </p>
 
1961
        </item>
 
1962
        <item>
 
1963
          <p>The behaviour of the inet option {active,once} on peer
 
1964
            close is improved and documented.</p>
 
1965
          <p>Own Id: OTP-6681</p>
 
1966
        </item>
 
1967
        <item>
 
1968
          <p>The inet option send_timeout for connection oriented
 
1969
            sockets is added to allow for timeouts in communicating
 
1970
            send requests to the underlying TCP stack.</p>
 
1971
          <p>Own Id: OTP-6684 Aux Id: seq10637 OTP-6681 </p>
 
1972
        </item>
 
1973
        <item>
 
1974
          <p>The command line flag <c><![CDATA[-args_file FileName]]></c>, and
 
1975
            the environment variables <c><![CDATA[ERL_AFLAGS]]></c>, and
 
1976
            <c><![CDATA[ERL_ZFLAGS]]></c> for the <c><![CDATA[erl]]></c> command have been
 
1977
            added. For more information see the <c><![CDATA[erl(1)]]></c>
 
1978
            documentation.</p>
 
1979
          <p>Own Id: OTP-6697</p>
 
1980
        </item>
 
1981
        <item>
 
1982
          <p>The <c><![CDATA[is_constant/1]]></c> type test has been deprecated.
 
1983
            <c><![CDATA[is_constant/1]]></c> is improperly named and almost
 
1984
            entirely undocumented.</p>
 
1985
          <p>Own Id: OTP-6731</p>
 
1986
        </item>
 
1987
      </list>
 
1988
    </section>
 
1989
  </section>
 
1990
 
 
1991
  <section>
 
1992
    <title>Erts 5.5.4.3</title>
 
1993
 
 
1994
    <section>
 
1995
      <title>Fixed Bugs and Malfunctions</title>
 
1996
      <list type="bulleted">
 
1997
        <item>
 
1998
          <p><c><![CDATA[process_flag(trap_exit, Bad)]]></c> where <c><![CDATA[Bad]]></c>
 
1999
            was a term not equal to <c><![CDATA[true]]></c> or <c><![CDATA[false]]></c>,
 
2000
            didn't fail with <c><![CDATA[badarg]]></c> as it should; instead, the
 
2001
            failure was silently ignored. This bug was introduced in
 
2002
            <c><![CDATA[erts-5.5.2]]></c>.</p>
 
2003
          <p>Own Id: OTP-6627 Aux Id: OTP-6160 </p>
 
2004
        </item>
 
2005
        <item>
 
2006
          <p>The minimum and default stack size for async-threads has
 
2007
            been increased to 16 kilowords. This since the previous
 
2008
            minimum and default stack size of 8 kilowords proved to
 
2009
            be too small (introduced in <c><![CDATA[erts-5.5.4.2]]></c>).</p>
 
2010
          <p>Own Id: OTP-6628 Aux Id: OTP-6580, Seq10633 </p>
 
2011
        </item>
 
2012
      </list>
 
2013
    </section>
 
2014
 
 
2015
    <section>
 
2016
      <title>Improvements and New Features</title>
 
2017
      <list type="bulleted">
 
2018
        <item>
 
2019
          <p>process_flag/2 accepts the new flag <c><![CDATA[sensitive]]></c>.</p>
 
2020
          <p>Own Id: OTP-6592 Aux Id: seq10555 </p>
 
2021
        </item>
 
2022
      </list>
 
2023
    </section>
 
2024
  </section>
 
2025
 
 
2026
  <section>
 
2027
    <title>Erts 5.5.4.2</title>
 
2028
 
 
2029
    <section>
 
2030
      <title>Fixed Bugs and Malfunctions</title>
 
2031
      <list type="bulleted">
 
2032
        <item>
 
2033
          <p>When a port steals control over a file descriptor from
 
2034
            another port, the stealing port tests if the other port
 
2035
            is alive. This in order to be able to give an accurate
 
2036
            error message. In the runtime system with SMP support,
 
2037
            this test was done without appropriate locks held. This
 
2038
            could in worst case lead to an erroneous error message;
 
2039
            therefore, this bug is to be considered harmless.</p>
 
2040
          <p>Own Id: OTP-6602</p>
 
2041
        </item>
 
2042
      </list>
 
2043
    </section>
 
2044
 
 
2045
    <section>
 
2046
      <title>Improvements and New Features</title>
 
2047
      <list type="bulleted">
 
2048
        <item>
 
2049
          <p>The default stack size for threads in the async-thread
 
2050
            pool has been shrunk to 8 kilowords, i.e., 32 KB on
 
2051
            32-bit architectures. This small default size has been
 
2052
            chosen since the amount of async-threads might be quite
 
2053
            large. The default stack size is enough for drivers
 
2054
            delivered with Erlang/OTP, but might not be sufficiently
 
2055
            large for other dynamically linked in drivers that use
 
2056
            the <c><![CDATA[driver_async()]]></c> functionality. A suggested
 
2057
            stack size for threads in the async-thread pool can be
 
2058
            configured via the <c><![CDATA[+a]]></c> command line argument of
 
2059
            <c><![CDATA[erl(1)]]></c>.</p>
 
2060
          <p>*** POTENTIAL INCOMPATIBILITY ***</p>
 
2061
          <p>Own Id: OTP-6580</p>
 
2062
        </item>
 
2063
      </list>
 
2064
    </section>
 
2065
  </section>
 
2066
 
 
2067
  <section>
 
2068
    <title>Erts 5.5.4.1</title>
 
2069
 
 
2070
    <section>
 
2071
      <title>Fixed Bugs and Malfunctions</title>
 
2072
      <list type="bulleted">
 
2073
        <item>
 
2074
          <p>Setting the time on the system while using heart on a
 
2075
            linux machine where the emulator was built with
 
2076
            clock_gettime support (default from Linux 2.6/erts-5.5.4
 
2077
            and upwards), could make the heart command fire. This was
 
2078
            due to bug in the heart executable which is now
 
2079
            corrected.</p>
 
2080
          <p>Own Id: OTP-6598 Aux Id: seq10614 </p>
 
2081
        </item>
 
2082
      </list>
 
2083
    </section>
 
2084
  </section>
 
2085
 
 
2086
  <section>
 
2087
    <title>Erts 5.5.4</title>
 
2088
 
 
2089
    <section>
 
2090
      <title>Fixed Bugs and Malfunctions</title>
 
2091
      <list type="bulleted">
 
2092
        <item>
 
2093
          <p>Corrected misspelling of '<c><![CDATA[-pz]]></c>' in the help text
 
2094
            for <c><![CDATA[erlc]]></c>. (Thanks to Ulf Wiger.)</p>
 
2095
          <p>Own Id: OTP-6433</p>
 
2096
        </item>
 
2097
        <item>
 
2098
          <p>The MD5 calculation of a BEAM file done by
 
2099
            <c><![CDATA[code:module_md5/1]]></c>, <c><![CDATA[beam_lib:md5/1]]></c>, and by
 
2100
            the compiler for the default value of the <c><![CDATA[vsn]]></c>
 
2101
            attribute have all been changed so that its result will
 
2102
            be the same on all platforms; modules containing funs
 
2103
            could get different MD5s on different platforms.</p>
 
2104
          <p>Own Id: OTP-6459</p>
 
2105
        </item>
 
2106
        <item>
 
2107
          <p>The emulator could dump core while writing an
 
2108
            <c><![CDATA[erl_crash.dump]]></c> file if there were funs with a
 
2109
            large terms in its environment. Since there is no way to
 
2110
            inspect a fun's environment in the crashdump_viewer
 
2111
            application anyway, a variables in the environment are
 
2112
            now set to [] before dumping the fun. (Thanks to
 
2113
            Jean-Sebastien Pedron.)</p>
 
2114
          <p>Own Id: OTP-6504</p>
 
2115
        </item>
 
2116
        <item>
 
2117
          <p><c><![CDATA[{Port, {exit_status, S}}]]></c> messages from ports
 
2118
            opened with the <c><![CDATA[exit_status]]></c> option could under
 
2119
            rare circumstances be delayed. This bug was present on
 
2120
            Erlang runtime systems without SMP support on all unix
 
2121
            operating systems other than SunOS.</p>
 
2122
          <p>Own Id: OTP-6528</p>
 
2123
        </item>
 
2124
        <item>
 
2125
          <p>A bug in linuxthreads could cause the emulator to dump
 
2126
            core when dlerror() was called before the first call to
 
2127
            dlopen(). As a workaround the emulator always makes a
 
2128
            call to dlopen() on initialization when linuxthreads is
 
2129
            used as thread library.</p>
 
2130
          <p>Own Id: OTP-6530</p>
 
2131
        </item>
 
2132
        <item>
 
2133
          <p>file:sync/1 did not do anything on Windows. Now it calls
 
2134
            the system function for flushing buffers
 
2135
            (FlushFileBuffers()). (Thanks to Matthew Sackman.)</p>
 
2136
          <p>Own Id: OTP-6531</p>
 
2137
        </item>
 
2138
        <item>
 
2139
          <p><c><![CDATA[open_port/2]]></c> could on the runtime system with SMP
 
2140
            support fail with the wrong exit reason when a port
 
2141
            couldn't be created. When this happened the exit reason
 
2142
            was typically <c><![CDATA[eintr]]></c>, or <c><![CDATA[ebusy]]></c> instead of
 
2143
            <c><![CDATA[eagain]]></c>.</p>
 
2144
          <p>Own Id: OTP-6536</p>
 
2145
        </item>
 
2146
        <item>
 
2147
          <p>The file driver (efile_drv) did not flush data written
 
2148
            using the option 'delayed_write' after the set timeout
 
2149
            time, rather at the next file operation. This bug has now
 
2150
            been corrected.</p>
 
2151
          <p>Own Id: OTP-6538</p>
 
2152
        </item>
 
2153
      </list>
 
2154
    </section>
 
2155
 
 
2156
    <section>
 
2157
      <title>Improvements and New Features</title>
 
2158
      <list type="bulleted">
 
2159
        <item>
 
2160
          <p>An interface towards the SCTP Socket API Extensions
 
2161
            has been implemented.It is an Open Source patch courtesy
 
2162
            of Serge Aleynikov and Leonid Timochouk. The Erlang code
 
2163
            parts has been adapted by the OTP team, changing the
 
2164
            Erlang API somewhat.</p>
 
2165
          <p>The Erlang interface consists of the module
 
2166
            <c><![CDATA[gen_sctp]]></c> and an include file
 
2167
            <c><![CDATA[-include_lib("kernel/include/inet_sctp.hrl").]]></c> for
 
2168
            option record definitions. The <c><![CDATA[gen_sctp]]></c> module is
 
2169
            documented.</p>
 
2170
          <p>The delivered Open Source patch, before the OTP team
 
2171
            rewrites, was written according to
 
2172
            http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-13
 
2173
            and was claimed to work fine, tested on Linux Fedora Core
 
2174
            5.0 (kernel 2.6.15-2054 or later) and on Solaris 10 and
 
2175
            11. The OTP team rewrites used the same standard document
 
2176
            but might have accidentally broken some functionality. If
 
2177
            so it will soon be patched to working state. The tricky
 
2178
            parts in C and the general design has essentially not
 
2179
            changed. During the rewrites the code was hand tested on
 
2180
            SuSE Linux Enterprise Server 10, and briefly on Solaris
 
2181
            10. Feedbach on code and docs is very much
 
2182
            appreciated.</p>
 
2183
          <p>The SCTP interface is in beta state. It has only been
 
2184
            hand tested and has no automatic test suites in OPT
 
2185
            meaning everything is most certainly not tested. Socket
 
2186
            active mode is broken. IPv6 is not tested. The
 
2187
            documentation has been reworked due to the API changes,
 
2188
            but has not been proofread after this.</p>
 
2189
          <p>Thank you from the OTP team to Serge Aleynikov and
 
2190
            Leonid Timochouk for a valuable contribution. We hope we
 
2191
            have not messed it up too much.</p>
 
2192
          <p>Own Id: OTP-6336</p>
 
2193
        </item>
 
2194
        <item>
 
2195
          <p>A <c><![CDATA[{minor_version,Version}]]></c> option is now recognized
 
2196
            by <c><![CDATA[term_to_binary/2]]></c>. {minor_version,1} will cause
 
2197
            floats to be encoded in an exact and more space-efficient
 
2198
            way compared to the previous encoding.</p>
 
2199
          <p>Own Id: OTP-6434</p>
 
2200
        </item>
 
2201
        <item>
 
2202
          <p>There is a new <c><![CDATA[escript]]></c> program that can be used
 
2203
            for writing scripts in Erlang. Erlang scripts don't need
 
2204
            to be compiled and any arguments can be passed to them
 
2205
            without risk that they are interpreted by the Erlang
 
2206
            system.</p>
 
2207
          <p>Own Id: OTP-6505</p>
 
2208
        </item>
 
2209
        <item>
 
2210
          <p>Setting and getting socket options in a "raw" fashion is
 
2211
            now allowed. Using this feature will inevitably produce
 
2212
            non portable code, but will allow setting ang getting
 
2213
            arbitrary uncommon options on TCP stacks that do have
 
2214
            them.</p>
 
2215
          <p>Own Id: OTP-6519</p>
 
2216
        </item>
 
2217
        <item>
 
2218
          <p>Miscellaneous signal handling improvements on the Erlang
 
2219
            runtime system with SMP support.</p>
 
2220
          <p>The fallback implementation of spin locks and atomic
 
2221
            operations are now implemented using pthread spin locks
 
2222
            when pthread spin locks are found on the system.</p>
 
2223
          <p>The Erlang runtime system with SMP support can now run on
 
2224
            Linux systems that has Linuxthreads instead of NPTL
 
2225
            (Native POSIX Thread Library). Note that the SMP support
 
2226
            hasn't been as thoroughly tested with Linuxthreads as
 
2227
            with NPTL. A runtime system with SMP support will
 
2228
            therefore not be built by default on Linux when NPTL
 
2229
            isn't found. In order to force a build of the runtime
 
2230
            system with SMP support, pass <c><![CDATA[--enable-smp-support]]></c>
 
2231
            to <c><![CDATA[configure]]></c> when building OTP.</p>
 
2232
          <p>Own Id: OTP-6525</p>
 
2233
        </item>
 
2234
      </list>
 
2235
    </section>
 
2236
  </section>
 
2237
 
 
2238
  <section>
 
2239
    <title>Erts 5.5.3.1</title>
 
2240
 
 
2241
    <section>
 
2242
      <title>Fixed Bugs and Malfunctions</title>
 
2243
      <list type="bulleted">
 
2244
        <item>
 
2245
          <p><c><![CDATA[erlang:system_flag(multi_scheduling, block)]]></c> could
 
2246
            cause the emulator with SMP support to deadlock.</p>
 
2247
          <p>Own Id: OTP-6431 Aux Id: OTP-6403 </p>
 
2248
        </item>
 
2249
        <item>
 
2250
          <p>The runtime system with SMP support failed to call the
 
2251
            driver timeout callback of ports in state closing. This
 
2252
            could cause ports to fail flushing their I/O queues.</p>
 
2253
          <p>Own Id: OTP-6432</p>
 
2254
        </item>
 
2255
        <item>
 
2256
          <p>The <c><![CDATA[{Port, closed}]]></c> message from a closed port
 
2257
            could arrive at the port owner before <c><![CDATA[Port]]></c> had
 
2258
            been removed from the result of <c><![CDATA[erlang:ports/0]]></c> in
 
2259
            the runtime system with SMP support.</p>
 
2260
          <p>Own Id: OTP-6437</p>
 
2261
        </item>
 
2262
        <item>
 
2263
          <p>The async id of async jobs created via
 
2264
            <c><![CDATA[driver_async]]></c> wasn't created in a thread safe
 
2265
            manner in the runtime system with SMP support. This could
 
2266
            in worst case cause <c><![CDATA[driver_async_cancel()]]></c> to
 
2267
            cancel another async job than intended.</p>
 
2268
          <p>Own Id: OTP-6438</p>
 
2269
        </item>
 
2270
        <item>
 
2271
          <p>Under rare circumstances a terminating connection between
 
2272
            two nodes could cause an instantaneous reconnect between
 
2273
            the two nodes to fail on the runtime system with SMP
 
2274
            support.</p>
 
2275
          <p>Own Id: OTP-6447</p>
 
2276
        </item>
 
2277
        <item>
 
2278
          <p>In the documentation of the driver entry field
 
2279
            <c><![CDATA[extended_marker]]></c> of erts version 5.5.3
 
2280
            (<c><![CDATA[driver_entry(3)]]></c>), the following is stated: "The
 
2281
            following fields are ignored if this field is equal to
 
2282
            <c><![CDATA[0]]></c>". This is a documentation bug and has been
 
2283
            changed to: "If this field is equal to <c><![CDATA[0]]></c>, all the
 
2284
            fields following this field also <em>have</em> to be
 
2285
            <c><![CDATA[0]]></c>, or <c><![CDATA[NULL]]></c> in case it is a pointer field".</p>
 
2286
          <p>The runtime check for detection of old incompatible
 
2287
            drivers made when loading drivers has been improved. The
 
2288
            emulator can, however, not make sure that a driver that
 
2289
            doesn't use the extended driver interface isn't
 
2290
            incompatible. Therefore, when loading a driver that
 
2291
            doesn't use the extended driver interface, there is a
 
2292
            risk that it will be loaded also when the driver is
 
2293
            incompatible. When the driver use the extended driver
 
2294
            interface, the emulator can verify that it isn't of an
 
2295
            incompatible driver version. You are therefore advised to
 
2296
            use the extended driver interface.</p>
 
2297
          <p>For more information see the <c><![CDATA[erl_driver(3)]]></c> and
 
2298
            <c><![CDATA[driver_entry(3)]]></c> documentation.</p>
 
2299
          <p>Own Id: OTP-6452 Aux Id: OTP-6330 </p>
 
2300
        </item>
 
2301
        <item>
 
2302
          <p>When terminating ports on the runtime system with SMP
 
2303
            support, removal of links to processes was done without
 
2304
            locking the link lock on processes. This could cause an
 
2305
            emulator crash.</p>
 
2306
          <p>Own Id: OTP-6475</p>
 
2307
        </item>
 
2308
        <item>
 
2309
          <p>The emulator with SMP support could crash when a port
 
2310
            flushed its I/O queue by calling <c><![CDATA[driver_async()]]></c>
 
2311
            from the timeout driver callback.</p>
 
2312
          <p>Own Id: OTP-6479</p>
 
2313
        </item>
 
2314
        <item>
 
2315
          <p>Large exit reasons could under rare circumstances cause
 
2316
            the runtime system with SMP support to crash.</p>
 
2317
          <p>Own Id: OTP-6521</p>
 
2318
        </item>
 
2319
      </list>
 
2320
    </section>
 
2321
 
 
2322
    <section>
 
2323
      <title>Improvements and New Features</title>
 
2324
      <list type="bulleted">
 
2325
        <item>
 
2326
          <p>Faster system calls for keeping the time accurate are
 
2327
            used on newer Linux kernels, which can result in a
 
2328
            significant speed-up of the emulator on those systems.</p>
 
2329
          <p>Own Id: OTP-6430</p>
 
2330
        </item>
 
2331
        <item>
 
2332
          <p>Added number of async threads and number of scheduler
 
2333
            threads to the system information that can be retrieved
 
2334
            via <c><![CDATA[driver_system_info()]]></c>. For more information see
 
2335
            the <c><![CDATA[erl_driver(3)]]></c> documentation.</p>
 
2336
          <p>Own Id: OTP-6440</p>
 
2337
        </item>
 
2338
        <item>
 
2339
          <p>When <c><![CDATA[SIGUSR1]]></c> is received by the runtime system
 
2340
            with SMP support, the <c><![CDATA[erl_crash.dump]]></c> is now
 
2341
            written by a special thread, instead of as before
 
2342
            directly from the signal handler.</p>
 
2343
          <p>Own Id: OTP-6465</p>
 
2344
        </item>
 
2345
        <item>
 
2346
          <p>term_to_binary/2 with compression is now faster.</p>
 
2347
          <p></p>
 
2348
          <p>term_to_binary/2 now accepts the option
 
2349
            '<c><![CDATA[{compressed,Level}]]></c>' for specifying the
 
2350
            compression level. <c><![CDATA[Level]]></c> must be in the range 0
 
2351
            (no compression) through 9 (highest compression level).
 
2352
            Default is 6.</p>
 
2353
          <p>Future compatibility bugfix: binary_to_term/1 did not
 
2354
            handle the <c><![CDATA[Uniq]]></c> and <c><![CDATA[Index]]></c> fields
 
2355
            correctly.</p>
 
2356
          <p>Own Id: OTP-6494</p>
 
2357
        </item>
 
2358
        <item>
 
2359
          <p>Removed unnecessary reallocation when initializing
 
2360
            kernel-poll set.</p>
 
2361
          <p>Own Id: OTP-6516</p>
 
2362
        </item>
 
2363
      </list>
 
2364
    </section>
 
2365
  </section>
 
2366
 
 
2367
  <section>
 
2368
    <title>Erts 5.5.3</title>
 
2369
 
 
2370
    <section>
 
2371
      <title>Fixed Bugs and Malfunctions</title>
 
2372
      <list type="bulleted">
 
2373
        <item>
 
2374
          <p>Node and fun table entries could under rare circumstances
 
2375
            be deallocated multiple times on the emulator with SMP
 
2376
            support.</p>
 
2377
          <p>Own Id: OTP-6369</p>
 
2378
        </item>
 
2379
        <item>
 
2380
          <p>epoll_wait() can repeat entries for the same file
 
2381
            descriptor in the result array. This could cause the
 
2382
            ready_input, ready_output, or event callbacks of a driver
 
2383
            to unintentionally be called multiple times. We have only
 
2384
            noted repeated entries when an error condition has
 
2385
            occurred on the file descriptor. In this case, the
 
2386
            repeated entries should normally not be a problem for the
 
2387
            driver since it should detect the error and de-select the
 
2388
            file descriptor. Therefore this bug should be considered
 
2389
            harmless. The emulator now coalesce repeated entries into
 
2390
            one.</p>
 
2391
          <p>You are only affected by this bug if you are using
 
2392
            erts-5.5.2.* and the kernel-poll feature on linux.</p>
 
2393
          <p>Own Id: OTP-6376 Aux Id: OTP-6222 </p>
 
2394
        </item>
 
2395
        <item>
 
2396
          <p>If a process that was waiting in gen_tcp:accept/1 was
 
2397
            killed, calling gen_tcp:accept/1 again on the same listen
 
2398
            socket would fail with '<c><![CDATA[{error,einval}]]></c>'.</p>
 
2399
          <p>Own Id: OTP-6381 Aux Id: seq10535 </p>
 
2400
        </item>
 
2401
        <item>
 
2402
          <p>The emulator failed to start on Solaris 10 when
 
2403
            kernel-poll support was enabled and the maximum number of
 
2404
            filedescriptors configured was less than or equal to 256.</p>
 
2405
          <p>Own Id: OTP-6384 Aux Id: OTP-6222 </p>
 
2406
        </item>
 
2407
        <item>
 
2408
          <p>The R10B compiler could generate unsafe
 
2409
            <c><![CDATA[bs_save/bs_restore]]></c> instructions that could cause
 
2410
            memory corruption. (The R11B compiler does not have that
 
2411
            problem.) The erlang emulator will now refuse to load
 
2412
            R10B-compiled modules that contain such unsafe
 
2413
            <c><![CDATA[bs_save/bs_restore]]></c> instructions. In addition, the
 
2414
            beam_validator module in the compiler will also reject
 
2415
            such instructions (in case it is used to validate R10B
 
2416
            code). (Thanks to Matthew Reilly.)</p>
 
2417
          <p>Own Id: OTP-6386</p>
 
2418
        </item>
 
2419
        <item>
 
2420
          <p>Process and port timers could fail to work properly on
 
2421
            the runtime system with SMP support. Many thanks to
 
2422
            Dmitriy Kargapolov and Serge Aleynikov who tracked down
 
2423
            this bug.</p>
 
2424
          <p>Own Id: OTP-6387</p>
 
2425
        </item>
 
2426
        <item>
 
2427
          <p>Bit syntax code compiled by an R10B compiler that matched
 
2428
            out a floating point number would not properly check that
 
2429
            the floating point number was valid; if the float was,
 
2430
            for instance, NaN the emulator could crash.</p>
 
2431
          <p>Own Id: OTP-6395</p>
 
2432
        </item>
 
2433
        <item>
 
2434
          <p>statistics(runtime) on Windows used to return the elapsed
 
2435
            system time for the process, instead of the user time.
 
2436
            Corrected. (Thanks to Robert Virding.)</p>
 
2437
          <p>Own Id: OTP-6407</p>
 
2438
        </item>
 
2439
        <item>
 
2440
          <p>A loadable driver (loaded by erl_ddll) which used
 
2441
            driver_async() would cause the emulator to crash. (Thanks
 
2442
            to Dmitriy Kargapolov.)</p>
 
2443
          <p>Own Id: OTP-6410</p>
 
2444
        </item>
 
2445
        <item>
 
2446
          <p>Under rare circumstances the emulator on unix platforms
 
2447
            could fail to terminate the Erlang port corresponding to
 
2448
            a port program opened with the <c><![CDATA[exit_status]]></c> option.</p>
 
2449
          <p>Own Id: OTP-6411</p>
 
2450
        </item>
 
2451
        <item>
 
2452
          <p>A link removed via <c><![CDATA[unlink/1]]></c> could under rare
 
2453
            circumstances transfer exit signals for a short period of
 
2454
            time after the call to <c><![CDATA[unlink/1]]></c> had returned when
 
2455
            the runtime system with SMP support was used.</p>
 
2456
          <p>Own Id: OTP-6425 Aux Id: OTP-6160 </p>
 
2457
        </item>
 
2458
      </list>
 
2459
    </section>
 
2460
 
 
2461
    <section>
 
2462
      <title>Improvements and New Features</title>
 
2463
      <list type="bulleted">
 
2464
        <item>
 
2465
          <p>In the runtime system with SMP support, ports are now
 
2466
            being scheduled on the scheduler threads interleaved with
 
2467
            processes instead of being run in a separate I/O thread.</p>
 
2468
          <p>Own Id: OTP-6262</p>
 
2469
        </item>
 
2470
        <item>
 
2471
          <p>More interfaces are added in erl_ddll, to support
 
2472
            different usage scenarios.</p>
 
2473
          <p>Own Id: OTP-6307 Aux Id: OTP-6234 </p>
 
2474
        </item>
 
2475
        <item>
 
2476
          <p>In the runtime system with SMP support, the global
 
2477
            I/O lock has been replaced with a more fine grained port
 
2478
            locking scheme. Port locking is either done on driver
 
2479
            level, i.e., all ports executing the same driver share a
 
2480
            lock, or on port level, i.e., each port has its own lock.
 
2481
            Currently the inet driver, the efile driver, and the
 
2482
            spawn driver use port level locking and all other
 
2483
            statically linked in drivers use driver level locking. By
 
2484
            default dynamically linked in drivers will use locking on
 
2485
            driver level. For more information on how to enable port
 
2486
            level locking see the <c><![CDATA[erl_driver(3)]]></c> and the
 
2487
            <c><![CDATA[driver_entry(3)]]></c> man pages. </p>
 
2488
          <p>As of erts
 
2489
            version 5.5.3 the driver interface has been extended. The
 
2490
            extended interface introduce version management, the
 
2491
            possibility to pass capability flags to the runtime
 
2492
            system at driver initialization, and some new driver API
 
2493
            functions. For example, the <c><![CDATA[driver_system_info()]]></c>
 
2494
            function which can be used to determine if the driver is
 
2495
            run in a runtime system with SMP support or not. The
 
2496
            extended interface doesn't have to be used, <em>but</em>
 
2497
            dynamically linked in driver <em>have</em> to be
 
2498
            recompiled. For information see the <c><![CDATA[erl_driver(3)]]></c>
 
2499
            and the <c><![CDATA[driver_entry(3)]]></c> man pages. </p>
 
2500
          <p><em>NOTE:</em> Dynamically linked in drivers
 
2501
            <em>have</em> to be recompiled. </p>
 
2502
          <p>*** POTENTIAL INCOMPATIBILITY ***</p>
 
2503
          <p>Own Id: OTP-6330 Aux Id: OTP-6262 </p>
 
2504
        </item>
 
2505
        <item>
 
2506
          <p>A test and debug feature which modifies the timing of the
 
2507
            runtime system has been added. For more information, see
 
2508
            documentation of the <c><![CDATA[+T<Level>]]></c> command line
 
2509
            argument of <c><![CDATA[erl(1)]]></c>.</p>
 
2510
          <p>Own Id: OTP-6382</p>
 
2511
        </item>
 
2512
        <item>
 
2513
          <p>The version of zlib (http://zlib.net) linked into
 
2514
            run-time system has been updated to version 1.2.3.</p>
 
2515
          <p>Own Id: OTP-6394</p>
 
2516
        </item>
 
2517
        <item>
 
2518
          <p>The <c><![CDATA[erlc]]></c> program now passes on the <c><![CDATA[-smp]]></c>
 
2519
            and <c><![CDATA[-hybrid]]></c> options to the Erlang emulator it
 
2520
            starts. This is mainly useful for compiling native code,
 
2521
            because native code must be compiled with same type of
 
2522
            run-time system as in which it will be run.</p>
 
2523
          <p>If the <c><![CDATA[-s]]></c> option is given, <c><![CDATA[erlc]]></c> now
 
2524
            prints a warning that it is deprecated and that it will
 
2525
            be removed in R12B.</p>
 
2526
          <p>Own Id: OTP-6398</p>
 
2527
        </item>
 
2528
        <item>
 
2529
          <p>The <c><![CDATA[schedulers]]></c> option of
 
2530
            <c><![CDATA[erlang:system_flag/2]]></c> has been removed, i.e., the
 
2531
            number of scheduler threads cannot be changed after
 
2532
            emulator boot time any more.</p>
 
2533
          <p>A <c><![CDATA[multi_scheduling]]></c> option has been added to
 
2534
            <c><![CDATA[erlang:system_flag/2]]></c>. This option can be used for
 
2535
            blocking and unblocking multi-scheduling. For more
 
2536
            information see the <c><![CDATA[erlang(3)]]></c> documentation.</p>
 
2537
          <p>Own Id: OTP-6403</p>
 
2538
        </item>
 
2539
        <item>
 
2540
          <p>A port program that had been started with the
 
2541
            <c><![CDATA[exit_status]]></c> option and closed one of the pipes
 
2542
            used for communication with the emulator caused the
 
2543
            emulator to continuously poll for termination of the port
 
2544
            program. This only became a problem when the emulator
 
2545
            didn't have other things to do and the port program
 
2546
            closed a pipe much earlier than it terminated. When the
 
2547
            emulator had other things to do, such as running Erlang
 
2548
            processes, the emulator polled for termination in between
 
2549
            scheduling of processes.</p>
 
2550
          <p>Now the emulator doesn't poll for termination of the port
 
2551
            program at all; instead, it waits for the child signal
 
2552
            from the terminated port program to arrive and then
 
2553
            schedules the Erlang port for termination.</p>
 
2554
          <p>The termination of any port programs have also been
 
2555
            optimized. Previously the termination of any port program
 
2556
            did always cause a scan of a table of the size equal to
 
2557
            maximum number of file descriptors. If the maximum number
 
2558
            of file descriptors was large, this scan could be quite
 
2559
            expensive. Now the search have been reduced to the set of
 
2560
            ports started with the <c><![CDATA[exit_status]]></c> option.</p>
 
2561
          <p>Note, all of the above only applies to Erlang emulators
 
2562
            on Unix platforms.</p>
 
2563
          <p>Own Id: OTP-6412 Aux Id: seq10194 </p>
 
2564
        </item>
 
2565
        <item>
 
2566
          <p>* BEAM: added support for floating-point exceptions on
 
2567
            FreeBSD (32-bit x86)</p>
 
2568
          <p>* SMP: made locking procedures work even when native
 
2569
            lock operations aren't implemented</p>
 
2570
          <p>* SMP: improved timing accuracy in the timer thread
 
2571
            (if enabled)</p>
 
2572
          <p>Own Id: OTP-6424</p>
 
2573
        </item>
 
2574
      </list>
 
2575
    </section>
 
2576
  </section>
 
2577
 
 
2578
  <section>
 
2579
    <title>Erts 5.5.2.2</title>
 
2580
 
 
2581
    <section>
 
2582
      <title>Fixed Bugs and Malfunctions</title>
 
2583
      <list type="bulleted">
 
2584
        <item>
 
2585
          <p>A bug in the kernel poll implementation could cause the
 
2586
            emulator to omit polling for events on file descriptors.
 
2587
            The bug was only present when using the kernel poll
 
2588
            implementation based on epoll or kqueue. This bug was
 
2589
            introduced in erts-5.5.2.</p>
 
2590
          <p>Own Id: OTP-6344 Aux Id: OTP-6222 </p>
 
2591
        </item>
 
2592
      </list>
 
2593
    </section>
 
2594
  </section>
 
2595
 
 
2596
  <section>
 
2597
    <title>Erts 5.5.2.1</title>
 
2598
 
 
2599
    <section>
 
2600
      <title>Fixed Bugs and Malfunctions</title>
 
2601
      <list type="bulleted">
 
2602
        <item>
 
2603
          <p>The run_erl program now aquires its psedo-ttys using
 
2604
            openpty(3), so that it will work on newer Linux
 
2605
            distributions that don't have the traditional pseudo-tty
 
2606
            devices in the file system. On platforms that don't have
 
2607
            openpty(3), run_erl will still search for pseudo-tty
 
2608
            devices in the file system.</p>
 
2609
          <p>The run_erl program will now wait using waitpid(3) to
 
2610
            prevent the program it spawned to become defunct. run_erl
 
2611
            will also terminate after a delay of 5 seconds (to allow
 
2612
            any pending output to be written to the log file) if the
 
2613
            spawned program terminates even if some child of it still
 
2614
            holds stdin and/or stdout open.</p>
 
2615
          <p>Own Id: OTP-6225 Aux Id: seq10500 </p>
 
2616
        </item>
 
2617
        <item>
 
2618
          <p>A bug in ordered_set ETS datatyp caused ets:select (and
 
2619
            match) to return faulty results when the table contained
 
2620
            process id's from another node.</p>
 
2621
          <p>Own Id: OTP-6338</p>
 
2622
        </item>
 
2623
      </list>
 
2624
    </section>
 
2625
  </section>
 
2626
 
 
2627
  <section>
 
2628
    <title>Erts 5.5.2</title>
 
2629
 
 
2630
    <section>
 
2631
      <title>Fixed Bugs and Malfunctions</title>
 
2632
      <list type="bulleted">
 
2633
        <item>
 
2634
          <p>erlc: A typo in the help text for '-pa path' was
 
2635
            corrected.</p>
 
2636
          <p>Own Id: OTP-6218</p>
 
2637
        </item>
 
2638
        <item>
 
2639
          <p>Failure in port command/control driver callbacks could
 
2640
            crash the non-SMP emulator. This bug was introduced in
 
2641
            the 5.5 version of erts.</p>
 
2642
          <p>Own Id: OTP-6224</p>
 
2643
        </item>
 
2644
        <item>
 
2645
          <p>Erroneous "<c><![CDATA[Input driver gone away without deselecting!]]></c>" error reports could sometimes occur
 
2646
            when a driver instance terminated in the ready_output()
 
2647
            callback of the driver. This bug was only present in
 
2648
            emulators that used poll(). Note, that this bug was
 
2649
            harmless, the only effect it had was the erroneous error
 
2650
            report.</p>
 
2651
          <p>Own Id: OTP-6229 Aux Id: OTP-3993, Seq5266, Seq7247,
 
2652
            OTP-4307 </p>
 
2653
        </item>
 
2654
        <item>
 
2655
          <p>The emulator could cause a type assertion failure while
 
2656
            writing an erl_crash.dump, causing the erl_crash.dump to
 
2657
            be terminated and a core dump generated.</p>
 
2658
          <p>Own Id: OTP-6235 Aux Id: seq10444 </p>
 
2659
        </item>
 
2660
        <item>
 
2661
          <p>The registered name of a process is now the last
 
2662
            observable resource removed before links and monitors are
 
2663
            triggered when a process terminates.</p>
 
2664
          <p>Previously ets tables were removed after the registered
 
2665
            name. This could cause problems on the runtime system
 
2666
            with SMP support for code that expected that ets tables
 
2667
            owned by a specific process had been removed if the name
 
2668
            of the process had been removed.</p>
 
2669
          <p>Own Id: OTP-6237</p>
 
2670
        </item>
 
2671
        <item>
 
2672
          <p>Failure to fork() a new (os) process could cause the
 
2673
            emulator to deadlock. This bug affect all emulators with
 
2674
            SMP support, and emulators with async thread support on
 
2675
            SunOS.</p>
 
2676
          <p>Own Id: OTP-6241 Aux Id: OTP-3906 </p>
 
2677
        </item>
 
2678
        <item>
 
2679
          <p>Fprof traces could become truncated for the SMP emulator.
 
2680
            This bug has now been corrected.</p>
 
2681
          <p>Own Id: OTP-6246</p>
 
2682
        </item>
 
2683
        <item>
 
2684
          <p>The undocumented functions inet:getiflist/0,1
 
2685
            inet:ifget/2,3 and inet:getif/1 were completely broken on
 
2686
            Windows. That has been fixed.</p>
 
2687
          <p>Own Id: OTP-6255</p>
 
2688
        </item>
 
2689
        <item>
 
2690
          <p>Behavior in case of disappeared nodes when using the
 
2691
            dist_auto_connect once got changed in R11B-1. The
 
2692
            timeouts regarding normal distributed operationes is now
 
2693
            reverted to the old (pre R11B-1).</p>
 
2694
          <p>Own Id: OTP-6258 Aux Id: OTP-6200, seq10449 </p>
 
2695
        </item>
 
2696
        <item>
 
2697
          <p>The bsl and bsr operators could cause the emulator to
 
2698
            crash if given invalid arguments. (Thanks to datacompboy
 
2699
            and Per Gustafsson.)</p>
 
2700
          <p>Own Id: OTP-6259</p>
 
2701
        </item>
 
2702
        <item>
 
2703
          <p>driver_cancel_timer() could under certain circumstances
 
2704
            fail to cancel the timer on the runtime system with SMP
 
2705
            support.</p>
 
2706
          <p>Own Id: OTP-6261</p>
 
2707
        </item>
 
2708
        <item>
 
2709
          <p>A call to erlang:system_info(info) could deadlock the
 
2710
            runtime system with SMP support.</p>
 
2711
          <p>Own Id: OTP-6268</p>
 
2712
        </item>
 
2713
      </list>
 
2714
    </section>
 
2715
 
 
2716
    <section>
 
2717
      <title>Improvements and New Features</title>
 
2718
      <list type="bulleted">
 
2719
        <item>
 
2720
          <p>Exit signals are now truly asynchronous in the runtime
 
2721
            system with SMP support. This simplifies locking in bifs
 
2722
            a lot, and makes process termination cheaper.</p>
 
2723
          <p>Own Id: OTP-6160</p>
 
2724
        </item>
 
2725
        <item>
 
2726
          <p>When tracing on the runtime system with SMP support it
 
2727
            can be difficult to know when a trace has been delivered
 
2728
            to the tracer. A new built in function
 
2729
            <c><![CDATA[erlang:trace_delivered/1]]></c> has been introduced in
 
2730
            order to make it easier to know when the trace has been
 
2731
            delivered. See the erlang(3) man page for more
 
2732
            information.</p>
 
2733
          <p>Own Id: OTP-6205 Aux Id: OTP-6269 </p>
 
2734
        </item>
 
2735
        <item>
 
2736
          <p>Kernel poll support can now be combined with SMP support.
 
2737
            Currently the following kernel poll versions exist:
 
2738
            <c><![CDATA[/dev/poll]]></c>, <c><![CDATA[epoll]]></c>, and <c><![CDATA[kqueue]]></c>. Linux
 
2739
            <c><![CDATA[kpoll]]></c> has been replaced with <c><![CDATA[epoll]]></c>. Some
 
2740
            time in the future there will also be a kernel poll
 
2741
            version using Solaris event ports.</p>
 
2742
          <p>The "check io" implementation for unix has been
 
2743
            completely rewritten. The current kernel poll
 
2744
            implementation reduce the amount of system calls needed
 
2745
            compared to the old kernel poll implementation.</p>
 
2746
          <p>When <c><![CDATA[epoll]]></c> or <c><![CDATA[kqueue]]></c> is used either
 
2747
            <c><![CDATA[poll]]></c> or <c><![CDATA[select]]></c> is used as fallback.
 
2748
            Previously only <c><![CDATA[poll]]></c> could be used as fallback.
 
2749
            Since <c><![CDATA[select]]></c> now can be used as fallback, kernel
 
2750
            poll support is now also available on newer MacOSX. Note
 
2751
            however, when <c><![CDATA[select]]></c> is used as fallback, the
 
2752
            maximum number of file descriptors is limited to
 
2753
            <c><![CDATA[FD_SETSIZE]]></c>. </p>
 
2754
          <p>Kernel poll support is now enabled by default if
 
2755
            <c><![CDATA[/dev/poll]]></c>, <c><![CDATA[epoll]]></c>, or <c><![CDATA[kqueue]]></c> is found
 
2756
            when building OTP, i.e. you do not have to pass the
 
2757
            <c><![CDATA[--enable-kernel-poll]]></c> argument to <c><![CDATA[configure]]></c>.
 
2758
            As before, kernel poll is disabled by default in the
 
2759
            runtime system. In order to enable it, pass the
 
2760
            <c><![CDATA[+Ktrue]]></c> command line argument to <c><![CDATA[erl]]></c>.</p>
 
2761
          <p>Note: <c><![CDATA[configure]]></c> will refuse to enable kernel poll
 
2762
            support on FreeBSD since <c><![CDATA[kqueue]]></c> have problems with
 
2763
            (at least) pipes on all version of FreeBSD that we have
 
2764
            tested.</p>
 
2765
          <p>Own Id: OTP-6222 Aux Id: seq10380 </p>
 
2766
        </item>
 
2767
        <item>
 
2768
          <p>The <c><![CDATA[erl_ddll]]></c> module and the code in the emulator
 
2769
            have been completely rewritten; several bugs were fixed.</p>
 
2770
          <p>Own Id: OTP-6234</p>
 
2771
        </item>
 
2772
        <item>
 
2773
          <p>The SMP emulator now avoids locking for the following
 
2774
            operations (thus making them as fast as in the UP
 
2775
            emulator): <c><![CDATA[atom_to_list/1]]></c>, atom comparision, atom
 
2776
            hashing, <c><![CDATA[erlang:apply/3]]></c>.</p>
 
2777
          <p>Own Id: OTP-6252</p>
 
2778
        </item>
 
2779
        <item>
 
2780
          <p>There are new BIFs <c><![CDATA[erlang:spawn_monitor/1,3]]></c>,
 
2781
            and the new option <c><![CDATA[monitor]]></c> for
 
2782
            <c><![CDATA[spawn_opt/2,3,4,5]]></c>.</p>
 
2783
          <p>The <c><![CDATA[observer_backend]]></c> module has been updated to
 
2784
            handle the new BIFs.</p>
 
2785
          <p>Own Id: OTP-6281</p>
 
2786
        </item>
 
2787
      </list>
 
2788
    </section>
 
2789
  </section>
 
2790
 
 
2791
  <section>
 
2792
    <title>Erts 5.5.1.1</title>
 
2793
 
 
2794
    <section>
 
2795
      <title>Improvements and New Features</title>
 
2796
      <list type="bulleted">
 
2797
        <item>
 
2798
          <p>There is now an option read_packets for UDP sockets that
 
2799
            sets the maximum number of UDP packets that will be read
 
2800
            for each invocation of the socket driver.</p>
 
2801
          <p>Own Id: OTP-6249 Aux Id: seq10452 </p>
 
2802
        </item>
 
2803
      </list>
 
2804
    </section>
 
2805
  </section>
 
2806
 
 
2807
  <section>
 
2808
    <title>Erts 5.5.1</title>
 
2809
 
 
2810
    <section>
 
2811
      <title>Fixed Bugs and Malfunctions</title>
 
2812
      <list type="bulleted">
 
2813
        <item>
 
2814
          <p>Complex pattern matching of strings would fail in the 64
 
2815
            bits emulator because of a bug in the loader. (Thanks to
 
2816
            Igor Goryachev.)</p>
 
2817
          <p>Own Id: OTP-6142</p>
 
2818
        </item>
 
2819
        <item>
 
2820
          <p><c><![CDATA[-134217728 div 134217728]]></c> and <c><![CDATA[-134217728 rem 134217728]]></c> would be calculated incorrectly.
 
2821
            <c><![CDATA[abs(-2147483648)]]></c> could in unlucky circumstances
 
2822
            cause a heap overflow, as could size(Binary) when size of
 
2823
            the binary was larger than 128Mb.</p>
 
2824
          <p>Own Id: OTP-6154</p>
 
2825
        </item>
 
2826
        <item>
 
2827
          <p>erlang:display/1 displayed erroneous values for negative
 
2828
            integers.</p>
 
2829
          <p>Big integers (both positive and negative) were previously
 
2830
            displayed in hexadecimal form while small integers were
 
2831
            displayed in decimal form. All integers are now displayed
 
2832
            in decimal form.</p>
 
2833
          <p>NOTE: erlang:display/1 should only be used for debugging.</p>
 
2834
          <p>Own Id: OTP-6156</p>
 
2835
        </item>
 
2836
        <item>
 
2837
          <p>A call to erlang:trace/3 with erroneous flags caused the
 
2838
            SMP emulator to deadlock instead of exiting the calling
 
2839
            process with badarg.</p>
 
2840
          <p>Own Id: OTP-6175</p>
 
2841
        </item>
 
2842
        <item>
 
2843
          <p>A bug causing the emulator to hang when exiting a process
 
2844
            that is exception traced has been fixed.</p>
 
2845
          <p>Own Id: OTP-6180</p>
 
2846
        </item>
 
2847
        <item>
 
2848
          <p>ets:rename/1 could deadlock, or crash the SMP emulator
 
2849
            when the table wasn't a named table.</p>
 
2850
          <p>ets:next/2, and ets:prev/2 could return erroneous results
 
2851
            on the SMP emulator.</p>
 
2852
          <p>Own Id: OTP-6198 Aux Id: seq10392, seq10415 </p>
 
2853
        </item>
 
2854
        <item>
 
2855
          <p>A memory allocation bug could cause the SMP emulator to
 
2856
            crash when a process had executed a <c><![CDATA[receive after]]></c>
 
2857
            with a larger timeout than 10 minutes.</p>
 
2858
          <p>Own Id: OTP-6199</p>
 
2859
        </item>
 
2860
        <item>
 
2861
          <p>The runtime system with SMP support did not slowly adjust
 
2862
            it's view of time when the system time suddenly changed.</p>
 
2863
          <p>Timeouts could sometimes timeout too early on the runtime
 
2864
            system with SMP support.</p>
 
2865
          <p>Own Id: OTP-6202</p>
 
2866
        </item>
 
2867
      </list>
 
2868
    </section>
 
2869
 
 
2870
    <section>
 
2871
      <title>Improvements and New Features</title>
 
2872
      <list type="bulleted">
 
2873
        <item>
 
2874
          <p>The smp runtime system now automatically detects the
 
2875
            number of logical processors on MacOSX (darwin) and
 
2876
            OpenBSD.</p>
 
2877
          <p>The smp runtime system is now built by default on MacOSX
 
2878
            (darwin) on x86.</p>
 
2879
          <p>Own Id: OTP-6119</p>
 
2880
        </item>
 
2881
        <item>
 
2882
          <p>The <c><![CDATA[-smp]]></c> command line argument now take the
 
2883
            following options: <c><![CDATA[enable]]></c>, <c><![CDATA[auto]]></c>, or
 
2884
            <c><![CDATA[disable]]></c>.</p>
 
2885
          <p>Especially the <c><![CDATA[-smpauto]]></c> argument is useful since
 
2886
            it starts the Erlang runtime system with SMP support if
 
2887
            it is available and more than one logical processor are
 
2888
            detected; otherwise, it starts the Erlang runtime system
 
2889
            without SMP support. For more information see the
 
2890
            <c><![CDATA[erl(1)]]></c> man page.</p>
 
2891
          <p>Own Id: OTP-6126</p>
 
2892
        </item>
 
2893
        <item>
 
2894
          <p>Increased the reduction cost for sending messages in the
 
2895
            SMP emulator so it behaves more like the non-SMP
 
2896
            emulator.</p>
 
2897
          <p>Own Id: OTP-6196</p>
 
2898
        </item>
 
2899
        <item>
 
2900
          <p>A port running a dynamically linked-in driver that exits
 
2901
            due to the driver being unloaded now exits with exit
 
2902
            reason <c><![CDATA[driver_unloaded]]></c>. Previously the port exited
 
2903
            with exit reason <c><![CDATA[-1]]></c>.</p>
 
2904
          <p>*** POTENTIAL INCOMPATIBILITY ***</p>
 
2905
          <p>Own Id: OTP-6204</p>
 
2906
        </item>
 
2907
        <item>
 
2908
          <p>Changed name of the <c><![CDATA[erlang:system_info/1]]></c> argument
 
2909
            <c><![CDATA[scheduler]]></c> to <c><![CDATA[scheduler_id]]></c>. This since the
 
2910
            <c><![CDATA[scheduler]]></c> argument so easily could be mixed up
 
2911
            with the <c><![CDATA[schedulers]]></c> argument (both returning
 
2912
            integers).</p>
 
2913
          <p>*** POTENTIAL INCOMPATIBILITY ***</p>
 
2914
          <p>Own Id: OTP-6208</p>
 
2915
        </item>
 
2916
        <item>
 
2917
          <p>The changes below were made by Mikael Pettersson, HiPE.</p>
 
2918
          <p>HiPE runtime system:</p>
 
2919
          <p>Reduce overheads in the HiPE runtime system's BIF glue
 
2920
            code.</p>
 
2921
          <p>Fix bug when exceptions are thrown from BEAM to HiPE.</p>
 
2922
          <p>Support SPARC on Linux.</p>
 
2923
          <p>Support x86 on FreeBSD.</p>
 
2924
          <p>Floating-point exceptions:</p>
 
2925
          <p>Reduce overheads in checking results of floating-point
 
2926
            operations.</p>
 
2927
          <p>Minor bug fix in SSE2 floating-point exception
 
2928
            handling.</p>
 
2929
          <p>Support SSE2 floating-point exceptions on 32-bit x86
 
2930
            machines.</p>
 
2931
          <p>Make FP exceptions work in the SMP runtime system on
 
2932
            FreeBSD/x86.</p>
 
2933
          <p>Support floating-point exceptions on SPARCs running
 
2934
            Linux.</p>
 
2935
          <p>Runtime system:</p>
 
2936
          <p>Minor scheduler optimisation in the non-SMP runtime
 
2937
            system.</p>
 
2938
          <p>Substantial reduction of I/O thread overheads in the
 
2939
            SMP runtime system if the separate timer thread is used.
 
2940
            (In R11B-1, the separate timer thread is not used.)</p>
 
2941
          <p>Own Id: OTP-6211</p>
 
2942
        </item>
 
2943
      </list>
 
2944
    </section>
 
2945
  </section>
 
2946
 
 
2947
  <section>
 
2948
    <title>ERTS 5.5</title>
 
2949
 
 
2950
    <section>
 
2951
      <title>Fixed Bugs and Malfunctions</title>
 
2952
      <list type="bulleted">
 
2953
        <item>
 
2954
          <p>Previously <c><![CDATA[unlink/1]]></c> and <c><![CDATA[erlang:demonitor/2]]></c>
 
2955
            behaved completely asynchronous. This had one undesirable
 
2956
            effect, though. You could never know when you were
 
2957
            guaranteed <em>not</em> to be affected by a link that you
 
2958
            had unlinked or a monitor that you had demonitored.</p>
 
2959
          <p>The new behavior of <c><![CDATA[unlink/1]]></c> and
 
2960
            <c><![CDATA[erlang:demonitor/2]]></c> can be viewed as two operations
 
2961
            performed atomically. Asynchronously send an unlink
 
2962
            signal or a demonitor signal, and ignore any future
 
2963
            results of the link or monitor.</p>
 
2964
          <p><em>NOTE</em>: This change can cause some obscure code
 
2965
            to fail which previously did not. For example, the
 
2966
            following code might hang:</p>
 
2967
          <code type="none"><![CDATA[
 
2968
            Mon = erlang:monitor(process, Pid),
 
2969
\011    %% ...
 
2970
\011    exit(Pid, bang),
 
2971
            erlang:demonitor(Mon),
 
2972
\011    receive
 
2973
\011        {'DOWN', Mon , process, Pid, _} -> ok
 
2974
\011    %% We were previously guaranteed to get a down message
 
2975
\011    %% (since we exited the process ourself), so we could
 
2976
\011    %% in this case leave out:
 
2977
\011    %% after 0 -> ok
 
2978
\011    end,
 
2979
          ]]></code>
 
2980
          <p>*** POTENTIAL INCOMPATIBILITY ***</p>
 
2981
          <p>Own Id: OTP-5772</p>
 
2982
        </item>
 
2983
        <item>
 
2984
          <p>Two bugs fixed: If the environment variable <c><![CDATA[ERL_FLAGS]]></c>
 
2985
            was set, its contents would be appended to the end of the
 
2986
            command line even if the command line had an <c><![CDATA[-extra]]></c>
 
2987
            options. Changed to place the options from <c><![CDATA[ERL_FLAGS]]></c>
 
2988
            just before <c><![CDATA[-extra]]></c>. Also, the <c><![CDATA[-smp]]></c> and
 
2989
            <c><![CDATA[-hybrid]]></c> flags no longer have any effect if placed
 
2990
            after <c><![CDATA[-extra]]></c>.</p>
 
2991
          <p>Own Id: OTP-6054</p>
 
2992
        </item>
 
2993
      </list>
 
2994
    </section>
 
2995
 
 
2996
    <section>
 
2997
      <title>Improvements and New Features</title>
 
2998
      <list type="bulleted">
 
2999
        <item>
 
3000
          <p>The documentation for writing drivers in the ERTS User's
 
3001
            Guide has been expanded and updated.</p>
 
3002
          <p>Own Id: OTP-5192</p>
 
3003
        </item>
 
3004
        <item>
 
3005
          <p>The <c><![CDATA[andalso]]></c> and <c><![CDATA[orelse]]></c> operators are
 
3006
            now allowed to be used in guards. That also applies to
 
3007
            match specifications.</p>
 
3008
          <p>Own Id: OTP-5894 Aux Id: OTP-5149 </p>
 
3009
        </item>
 
3010
        <item>
 
3011
          <p>There is a new trace match spec function
 
3012
            <c><![CDATA[{exception_trace}]]></c> and a corresponding trace
 
3013
            message <c><![CDATA[exception_from]]></c> that can be used to trace
 
3014
            on any exit from a function, both normal function return
 
3015
            and exception return. See the documentation for
 
3016
            details.</p>
 
3017
          <p>The <c><![CDATA[return_to]]></c> trace message is now also
 
3018
            generated when the execution returns to a function due to
 
3019
            catching an exception.</p>
 
3020
          <p>Own Id: OTP-5956</p>
 
3021
        </item>
 
3022
        <item>
 
3023
          <p>Erlang runtime system with SMP (symmetric multi processing)
 
3024
            support.</p>
 
3025
          <p>The runtime system with SMP support is in this release
 
3026
            focused on stability and there are a number of steps
 
3027
            with optimizations to follow before it will take 
 
3028
            full advantage of multi processor systems.
 
3029
            The released system is however thruly multi threaded
 
3030
            and you will notice increased performance
 
3031
            for many applications already.
 
3032
            We recommend that you evaluate your application on  
 
3033
            the SMP version of the runtime system and wait for some
 
3034
            more optimizations before you use it in a real product. 
 
3035
            You will then discover if there are any problems in 
 
3036
            your application that needs to be fixed in order for 
 
3037
            it to work properly in a multi threaded environment. 
 
3038
            More optimized versions of the runtime system
 
3039
            with SMP support will be included in the R11B
 
3040
            maintenance releases.</p>
 
3041
          <p>The SMP enabled runtime system will be started if
 
3042
            the <c><![CDATA[-smp]]></c> command line argument is passed to
 
3043
            the <c><![CDATA[erl]]></c> command. In order to make use of more than
 
3044
            one processor core, multiple scheduler threads are used. By
 
3045
            default, the number of scheduler threads will equal
 
3046
            the number of processor cores. The number of scheduler
 
3047
            threads can be set with the <c><![CDATA[+S]]></c> command line argument.
 
3048
            For more information see the <c><![CDATA[erl(1)]]></c> man page.</p>
 
3049
          <p>A runtime system with SMP support is by default built on
 
3050
            the following platforms if posix threads, and a gcc
 
3051
            compiler of at least version 2.95 is found:</p>
 
3052
          <list type="bulleted">
 
3053
            <item>
 
3054
              <p>Linux with at least kernel version 2.6 and the Native
 
3055
                POSIX Thread Library on x86, x86_64, and 32-bits
 
3056
                PowerPC.</p>
 
3057
            </item>
 
3058
            <item>
 
3059
              <p>Solaris of at least version 8 on 32-bits SPARC-V9.</p>
 
3060
            </item>
 
3061
            <item>
 
3062
              <p>MacOSX of at least version 10.4 (Darwin 8.0) on
 
3063
                32-bits PowerPC.</p>
 
3064
            </item>
 
3065
          </list>
 
3066
          <p>The runtime system with SMP support is known <em>not</em>
 
3067
            to build on:</p>
 
3068
          <list type="bulleted">
 
3069
            <item>
 
3070
              <p>Windows.</p>
 
3071
            </item>
 
3072
            <item>
 
3073
              <p>Linux with kernel versions less than 2.4, or without
 
3074
                the Native POSIX Thread Library.</p>
 
3075
            </item>
 
3076
            <item>
 
3077
              <p>Other hardware platforms than x86, x86_64, 32-bits
 
3078
                SPARC-V9 and 32-bits PowerPC.</p>
 
3079
            </item>
 
3080
          </list>
 
3081
          <p>Windows will be supported in a future release.</p>
 
3082
          <p>The runtime system with SMP support might build on other
 
3083
            operating systems in combination with supported hardware.
 
3084
            In order to force a build of a runtime system with SMP
 
3085
            support, pass the <c><![CDATA[--enable-smp-support]]></c> command line
 
3086
            argument to configure. Note, however, that it is not enough
 
3087
            that it builds. The underlying thread library and operating
 
3088
            system has to provide SMP support as well. If the thread
 
3089
            library does not distribute scheduler threads over multiple
 
3090
            processor cores then the runtime system will only seemingly
 
3091
            provide SMP support. If the runtime system is not built by
 
3092
            default on a specific platform, we have <em>not</em> tested
 
3093
            it on that platform.</p>
 
3094
          <p><em>NOTE</em>: The design of SMP support for drivers is
 
3095
            ongoing. There will probably be incompatible driver
 
3096
            changes (only affecting drivers run on the runtime system
 
3097
            with SMP support) released as patches for R11B.</p>
 
3098
          <p><em>Potential incompatibility</em>: Previously, specific
 
3099
            driver call-backs were always called from the same thread.
 
3100
            This is <em>not</em> true in the runtime system with SMP
 
3101
            support. Calls to call-backs will be made from different
 
3102
            threads, e.g., two consecutive calls to exactly the same
 
3103
            call-back can be made from two different threads. This
 
3104
            will in <em>most</em> cases not be a problem. All calls
 
3105
            to call-backs are synchronized, i.e., only one call-back
 
3106
            will be called at a time.</p>
 
3107
          <p>In the future the default behavior will <em>probably</em>
 
3108
            be the following: Calls to call-backs will, as now, be
 
3109
            made from different threads. Calls to call-backs in the
 
3110
            same driver <em>instance</em> will be synchronized. It
 
3111
            will probably be possible to configure so that all calls
 
3112
            to call-backs in all driver instances of a specific
 
3113
            driver type will be synchronized. It may be possible to
 
3114
            configure so that all calls to call-backs of a driver
 
3115
            instance or a of a specific driver type will be made from
 
3116
            the same thread.</p>
 
3117
          <p>Parallelism in the Erlang code executed is a necessity
 
3118
            for the Erlang runtime system to be able to take
 
3119
            advantage of multi-core or multi-processor hardware.
 
3120
            There need to be at least as many Erlang processes
 
3121
            runnable as processor cores for the Erlang runtime system
 
3122
            to be able to take advantage of all processor cores.</p>
 
3123
          <p>An Erlang runtime system with SMP support with only one
 
3124
            Erlang process runnable all the time will almost always be
 
3125
            slower than the same Erlang runtime system without SMP
 
3126
            support. This is due to thread synchronization overhead.</p>
 
3127
          <p>Known major bottleneck in the Erlang runtime system:</p>
 
3128
          <list type="bulleted">
 
3129
            <item>
 
3130
              <p>Currently the I/O system uses one "big lock", i.e. only
 
3131
                one thread can do I/O at a time (with the exception of
 
3132
                async threads and threads created by users own linked-in
 
3133
                drivers). This is high on the list of things to
 
3134
                optimize. Note, code that does not do I/O can be executed
 
3135
                at the same time as one thread does I/O.</p>
 
3136
            </item>
 
3137
          </list>
 
3138
          <p>Some pitfalls which might cause Erlang programs that work on
 
3139
            the non-SMP runtime system to fail on the SMP runtime
 
3140
            system:</p>
 
3141
          <list type="bulleted">
 
3142
            <item>
 
3143
              <p>A newly spawned process will often begin executing
 
3144
                immediately. Code that expects that the parent process
 
3145
                will be able to execute for a while before the child
 
3146
                process begins executing is likely to fail.</p>
 
3147
            </item>
 
3148
            <item>
 
3149
              <p>High priority processes could previously provide
 
3150
                mutual exclusion (bad programming style) by preventing
 
3151
                normal and low priority processes from being run. High
 
3152
                priority processes cannot be used this way to provide
 
3153
                mutual exclusion.</p>
 
3154
            </item>
 
3155
            <item>
 
3156
              <p><c><![CDATA[erlang:yield()]]></c> could be used to provide some
 
3157
                kind of temporary mutual exclusion (also bad programming
 
3158
                style). <c><![CDATA[erlang:yield()]]></c> cannot be used to provide
 
3159
                any kind of mutual exclusion.</p>
 
3160
            </item>
 
3161
            <item>
 
3162
              <p>Obscure pitfall, only if a process being traced also
 
3163
                sends normal messages to the tracer:<br></br>
 
3164
                &nbsp;&nbsp;The order between trace messages and normal
 
3165
                messages is undefined. I.e. the order between normal
 
3166
                messages sent from a tracee to a tracer and the trace
 
3167
                messages generated from the same tracee to the same
 
3168
                tracer is undefined. The internal order of normal
 
3169
                messages and the internal order of trace messages will,
 
3170
                of course, be preserved as before.</p>
 
3171
            </item>
 
3172
          </list>
 
3173
          <p>The kernel poll feature is currently not supported by
 
3174
            the runtime system with SMP support. It will probably be
 
3175
            supported in a future release.</p>
 
3176
          <p>*** POTENTIAL INCOMPATIBILITY ***</p>
 
3177
          <p>Own Id: OTP-6006 Aux Id: OTP-6095 </p>
 
3178
        </item>
 
3179
        <item>
 
3180
          <p>Linked-in driver modifications.</p>
 
3181
          <list type="bulleted">
 
3182
            <item>
 
3183
              <p>Linked-in drivers must be recompiled.</p>
 
3184
            </item>
 
3185
            <item>
 
3186
              <p>The <c><![CDATA[refc]]></c> field in the <c><![CDATA[ErlDrvBinary]]></c> type
 
3187
                has been removed. The reference count can be accessed
 
3188
                via API functions. For more information see
 
3189
                the <c><![CDATA[erl_driver(1)]]></c> man page.</p>
 
3190
            </item>
 
3191
          </list>
 
3192
          <p>*** POTENTIAL INCOMPATIBILITY ***</p>
 
3193
          <p>Own Id: OTP-6095 Aux Id: OTP-6006 </p>
 
3194
        </item>
 
3195
      </list>
 
3196
    </section>
 
3197
  </section>
 
3198
 
 
3199
  <section>
 
3200
    <title>ERTS 5.4.13</title>
 
3201
 
 
3202
    <section>
 
3203
      <title>Fixed Bugs and Malfunctions</title>
 
3204
      <list type="bulleted">
 
3205
        <item>
 
3206
          <p>Large files (more than 2 GBytes) are now handled on
 
3207
            Solaris 8.</p>
 
3208
          <p>Own Id: OTP-5849 Aux Id: seq10157 </p>
 
3209
        </item>
 
3210
        <item>
 
3211
          <p>A failing bit syntax construction could fail with the
 
3212
            PREVIOUS exeption reason that had occured in the process
 
3213
            (instead of with <c><![CDATA[badarg]]></c>).</p>
 
3214
          <p>Own Id: OTP-5911</p>
 
3215
        </item>
 
3216
        <item>
 
3217
          <p>When building OTP, the Kernel application was built in
 
3218
            both the primary and secondary bootstrap steps, which
 
3219
            would cause problems if OTP including its bootstrap is
 
3220
            checked into a version control system (such as CVS).
 
3221
            (Thanks to Sebastian Strollo.)</p>
 
3222
          <p>Own Id: OTP-5921</p>
 
3223
        </item>
 
3224
        <item>
 
3225
          <p><c><![CDATA[binary_to_term(<<131,109,255,255,255,255)]]></c> and
 
3226
            similar expressions used to crash the emulator instead of
 
3227
            causing a <c><![CDATA[badarg]]></c> exception. (Thanks to Matthias
 
3228
            Lang.)</p>
 
3229
          <p>Own Id: OTP-5933</p>
 
3230
        </item>
 
3231
        <item>
 
3232
          <p><c><![CDATA[erlang:hibernate/3]]></c> could sometimes crash the emulator
 
3233
            when no heap was needed.</p>
 
3234
          <p>Own Id: OTP-5940</p>
 
3235
        </item>
 
3236
        <item>
 
3237
          <p>Execution of match specs could under rare circumstances
 
3238
            cause the emulator to dump core.</p>
 
3239
          <p>Execution of match specs could cause memory leaks in the
 
3240
            hybrid emulator.</p>
 
3241
          <p>Own Id: OTP-5955</p>
 
3242
        </item>
 
3243
        <item>
 
3244
          <p>A bug in <c><![CDATA[erlang:trace_info/2]]></c> when getting info for a
 
3245
            function in a deleted module resulting in an emulator
 
3246
            crash, has been corrected.</p>
 
3247
          <p>Own Id: OTP-5957</p>
 
3248
        </item>
 
3249
        <item>
 
3250
          <p>Different (and old) <c><![CDATA[config.guess]]></c> files in the
 
3251
            ERTS and Erl_Interface applications would cause build
 
3252
            problems on the new Intel-based iMacs.
 
3253
            (Thanks to Sebastion Strollo.)</p>
 
3254
          <p>Own Id: OTP-5967</p>
 
3255
        </item>
 
3256
        <item>
 
3257
          <p>pthread header and library mismatch on Linux systems (at
 
3258
            least some SuSE and Debian) with both NPTL and
 
3259
            Linuxthreads libraries installed.</p>
 
3260
          <p>Own Id: OTP-5981</p>
 
3261
        </item>
 
3262
      </list>
 
3263
    </section>
 
3264
 
 
3265
    <section>
 
3266
      <title>Improvements and New Features</title>
 
3267
      <list type="bulleted">
 
3268
        <item>
 
3269
          <p>The driver_set_timer did not change the previous timeout
 
3270
            if called a second time. Now it works as specified,
 
3271
            changing the timeout.</p>
 
3272
          <p>Own Id: OTP-5942</p>
 
3273
        </item>
 
3274
        <item>
 
3275
          <p>The undocumented <c><![CDATA[{packet,http}]]></c> option (for the
 
3276
            <c><![CDATA[gen_tcp]]></c> module) did not not work correctly when
 
3277
            there were multiple continuation lines. (Thanks to Per
 
3278
            Hedeland.)</p>
 
3279
          <p>Own Id: OTP-5945</p>
 
3280
        </item>
 
3281
        <item>
 
3282
          <p>The setuid_socket_wrap program was corrected to work for
 
3283
            C compilers that treat the <c><![CDATA[char]]></c> type as unsigned.
 
3284
            (Thanks to Magnus Henoch.)</p>
 
3285
          <p>Own Id: OTP-5946</p>
 
3286
        </item>
 
3287
      </list>
 
3288
    </section>
 
3289
  </section>
 
3290
 
 
3291
  <section>
 
3292
    <title>ERTS 5.4.12</title>
 
3293
 
 
3294
    <section>
 
3295
      <title>Fixed Bugs and Malfunctions</title>
 
3296
      <list type="bulleted">
 
3297
        <item>
 
3298
          <p>Fixed a minor build problem on Windows.</p>
 
3299
          <p>Own Id: OTP-5819 Aux Id: OTP-5382 OTP-5540 OTP-5577 </p>
 
3300
        </item>
 
3301
        <item>
 
3302
          <p>The <c><![CDATA[delay_send]]></c> option for <c><![CDATA[gen_tcp]]></c> was
 
3303
            broken on Windows.</p>
 
3304
          <p>Own Id: OTP-5822</p>
 
3305
        </item>
 
3306
        <item>
 
3307
          <p>If there were user-defined variables in the boot
 
3308
            script, and their values were not provided using the
 
3309
            <c><![CDATA[-boot_var]]></c> option, the emulator would refuse to
 
3310
            start with a confusing error message. Corrected to show a
 
3311
            clear, understandable message.</p>
 
3312
          <p>The <c><![CDATA[prim_file]]></c> module was modified to not depend
 
3313
            on the <c><![CDATA[lists]]></c> module, to make it possible to start
 
3314
            the emulator using a user-defined loader. (Thanks to
 
3315
            Martin Bjorklund.)</p>
 
3316
          <p>Own Id: OTP-5828 Aux Id: seq10151 </p>
 
3317
        </item>
 
3318
      </list>
 
3319
    </section>
 
3320
 
 
3321
    <section>
 
3322
      <title>Improvements and New Features</title>
 
3323
      <list type="bulleted">
 
3324
        <item>
 
3325
          <p>The HiPE compiler identifies more leaf functions,
 
3326
            giving slightly faster code.</p>
 
3327
          <p>Corrected problems in HiPE's coalescing register
 
3328
            allocating that would cause it to fail when compiling
 
3329
            very large functions (e.g. some of parse modules in the
 
3330
            Megaco application).</p>
 
3331
          <p>Own Id: OTP-5853</p>
 
3332
        </item>
 
3333
      </list>
 
3334
    </section>
 
3335
  </section>
 
3336
 
 
3337
  <section>
 
3338
    <title>ERTS 5.4.11</title>
 
3339
 
 
3340
    <section>
 
3341
      <title>Fixed Bugs and Malfunctions</title>
 
3342
      <list type="bulleted">
 
3343
        <item>
 
3344
          <p>Timers could sometimes timeout too early. This bug has
 
3345
            now been fixed.</p>
 
3346
          <p>Automatic cancellation of timers created by
 
3347
            <c><![CDATA[erlang:send_after(Time,pid(),Msg)]]></c> and
 
3348
            <c><![CDATA[erlang:start_timer(Time,pid(),Msg)]]></c> has been
 
3349
            introduced. Timers created with the receiver specified by a
 
3350
            pid, will automatically be cancelled when the receiver
 
3351
            exits. For more information see the <c><![CDATA[erlang(3)]]></c> man
 
3352
            page.</p>
 
3353
          <p>In order to be able to maintain a larger amount of timers
 
3354
            without increasing the maintenance cost, the internal
 
3355
            timer wheel and bif timer table have been enlarged.</p>
 
3356
          <p>Also a number of minor bif timer optimizations have been
 
3357
            implemented.</p>
 
3358
          <p>Own Id: OTP-5795 Aux Id: OTP-5090, seq8913, seq10139,
 
3359
            OTP-5782 </p>
 
3360
        </item>
 
3361
        <item>
 
3362
          <p><c><![CDATA[erlang:monitor(process,Pid)]]></c> hanged if <c><![CDATA[Pid]]></c>
 
3363
            referred to a process on a non-existing node with the same
 
3364
            nodename as the nodename of node on which the call was made.
 
3365
            This bug has now been fixed.</p>
 
3366
          <p>Own Id: OTP-5827</p>
 
3367
        </item>
 
3368
      </list>
 
3369
    </section>
 
3370
 
 
3371
    <section>
 
3372
      <title>Improvements and New Features</title>
 
3373
      <list type="bulleted">
 
3374
        <item>
 
3375
          <p>By setting Unix environment variables, the priority for
 
3376
            the emulator can be lowered when it is writing crash
 
3377
            dumps and the time allowed for finishing writing a crash
 
3378
            dump can be set to a certain number of seconds. See the
 
3379
            documentation for <c><![CDATA[erl]]></c> in the ERTS application.
 
3380
            (Also, a few other previously undocumented environment
 
3381
            variables are now documented.)</p>
 
3382
          <p>Own Id: OTP-5818</p>
 
3383
        </item>
 
3384
        <item>
 
3385
          <p>Documentation improvements:</p>
 
3386
          <p>- documentation for <c><![CDATA[erlang:link/1]]></c> corrected</p>
 
3387
          <p>- command line flag <c><![CDATA[-code_path_cache]]></c> added</p>
 
3388
          <p>- <c><![CDATA[erl]]></c> command line flags clarifications</p>
 
3389
          <p>- <c><![CDATA[net_kernel(3)]]></c> clarifications</p>
 
3390
          <p>Own Id: OTP-5847</p>
 
3391
        </item>
 
3392
      </list>
 
3393
    </section>
 
3394
  </section>
 
3395
 
 
3396
  <section>
 
3397
    <title>ERTS 5.4.10</title>
 
3398
 
 
3399
    <section>
 
3400
      <title>Fixed Bugs and Malfunctions</title>
 
3401
      <list type="bulleted">
 
3402
        <item>
 
3403
          <p>-D_GNU_SOURCE is now always passed on the compile command
 
3404
            line on linux. This in order to ensure that all included
 
3405
            system headers see _GNU_SOURCE defined.</p>
 
3406
          <p>_GNU_SOURCE is now also defined on linux in configure
 
3407
            when looking for features.</p>
 
3408
          <p>Some minor (harmless) configure bugs were also fixed.</p>
 
3409
          <p>Own Id: OTP-5749</p>
 
3410
        </item>
 
3411
        <item>
 
3412
          <p>Some compiler warnings and Dialyzer warnings were
 
3413
            eliminated in the Tools application.</p>
 
3414
          <p>When tracing to a port (which <c><![CDATA[fprof]]></c> does),
 
3415
            there could be fake schedule out/schedule in messages
 
3416
            sent for a process that had exited.</p>
 
3417
          <p>Own Id: OTP-5757</p>
 
3418
        </item>
 
3419
      </list>
 
3420
    </section>
 
3421
 
 
3422
    <section>
 
3423
      <title>Improvements and New Features</title>
 
3424
      <list type="bulleted">
 
3425
        <item>
 
3426
          <p>The BIFs <c><![CDATA[iolist_size/1]]></c> and <c><![CDATA[iolist_to_binary/1]]></c>
 
3427
            has been added.</p>
 
3428
          <p>The BIF <c><![CDATA[list_to_existing_atom/1]]></c> has been added.</p>
 
3429
          <p>Minor bug fix: The exception reason could be changed
 
3430
            to <c><![CDATA[error]]></c> inside nested try/catch constructs if the
 
3431
            <c><![CDATA[erlang:raise/3]]></c> BIF was called with an empty
 
3432
            stacktrace. (Calling <c><![CDATA[erlang:raise/3]]></c> with an empty
 
3433
            stacktrace is NOT recommended.)</p>
 
3434
          <p>Minor bugfix: On Windows, <c><![CDATA[file:open/2]]></c> will now
 
3435
            return the documented error reason <c><![CDATA[{error,eisdir}]]></c>
 
3436
            if the filename refers to a directory (it used to return
 
3437
            <c><![CDATA[{error,eacces}]]></c>).</p>
 
3438
          <p>The message in the documentation for
 
3439
            <c><![CDATA[erlang:system_monitor/2]]></c>, description of
 
3440
            <c><![CDATA[busy_dist_port]]></c>, was corrected.</p>
 
3441
          <p>Own Id: OTP-5709 Aux Id: seq10100 </p>
 
3442
        </item>
 
3443
        <item>
 
3444
          <p>The previously undocumented and UNSUPPORTED <c><![CDATA[zlib]]></c>
 
3445
            module has been updated in an incompatible way and many
 
3446
            bugs have been corrected. It is now also documented.</p>
 
3447
          <p>*** POTENTIAL INCOMPATIBILITY ***</p>
 
3448
          <p>Own Id: OTP-5715</p>
 
3449
        </item>
 
3450
        <item>
 
3451
          <p>New socket options <c><![CDATA[priority]]></c> and <c><![CDATA[tos]]></c> for
 
3452
            platforms that support them (currently only Linux).</p>
 
3453
          <p>Own Id: OTP-5756</p>
 
3454
        </item>
 
3455
        <item>
 
3456
          <p>Only the emulator is now linked with termcap library in
 
3457
            order to decrease library dependencies for other otp
 
3458
            programs.</p>
 
3459
          <p>Own Id: OTP-5758</p>
 
3460
        </item>
 
3461
      </list>
 
3462
    </section>
 
3463
  </section>
 
3464
 
 
3465
  <section>
 
3466
    <title>ERTS 5.4.9.2</title>
 
3467
 
 
3468
    <section>
 
3469
      <title>Fixed Bugs and Malfunctions</title>
 
3470
      <list type="bulleted">
 
3471
        <item>
 
3472
          <p>The native resolver has gotten an control API for
 
3473
            extended debugging and soft restart. It is:
 
3474
            <c><![CDATA[inet_gethost_native:control(Control)]]></c><br></br><c><![CDATA[Control = {debug_level,Level} | soft_restart]]></c><br></br><c><![CDATA[Level = integer() in the range 0-4]]></c>.</p>
 
3475
          <p>Own Id: OTP-5751 Aux Id: EABln25013 </p>
 
3476
        </item>
 
3477
      </list>
 
3478
    </section>
 
3479
  </section>
 
3480
 
 
3481
  <section>
 
3482
    <title>ERTS 5.4.9.1</title>
 
3483
 
 
3484
    <section>
 
3485
      <title>Improvements and New Features</title>
 
3486
      <list type="bulleted">
 
3487
        <item>
 
3488
          <p>On VxWorks, epmd did not handle file descriptors with
 
3489
            higher numbers than 63. Also, if epmd should get a file
 
3490
            descriptor with a number &gt;= FD_SETSIZE, it will close a
 
3491
            the file descritport and write a message to the log
 
3492
            (instead of mysteriously fail); the Erlang node that
 
3493
            tried to register will fail with a duplicate_name error
 
3494
            (unfortunately, epmd has no way to indicate to the Erlang
 
3495
            node why the register attempt failed).</p>
 
3496
          <p>Own Id: OTP-5716 Aux Id: seq10070 </p>
 
3497
        </item>
 
3498
      </list>
 
3499
    </section>
 
3500
  </section>
 
3501
 
 
3502
  <section>
 
3503
    <title>ERTS 5.4.9</title>
 
3504
 
 
3505
    <section>
 
3506
      <title>Fixed Bugs and Malfunctions</title>
 
3507
      <list type="bulleted">
 
3508
        <item>
 
3509
          <p>Timezone data is now initialized better. (was a problem
 
3510
            at least on NetBSD 2.0.2) Thanks to Rich Neswold.</p>
 
3511
          <p>Own Id: OTP-5621</p>
 
3512
        </item>
 
3513
        <item>
 
3514
          <p>The hybrid-heap emulator ('erl -hybrid') is much more
 
3515
            stable. We have corrected all known bugs that caused it
 
3516
            to dump core while running our test suites.</p>
 
3517
          <p>Own Id: OTP-5634</p>
 
3518
        </item>
 
3519
        <item>
 
3520
          <p>Fixed rare memory leaks in <c><![CDATA[erlang:demonitor/1]]></c> when
 
3521
            distributed monitors were removed.</p>
 
3522
          <p>Own Id: OTP-5692</p>
 
3523
        </item>
 
3524
        <item>
 
3525
          <p>Processes were sometimes unnecessarily garbage collected
 
3526
            when terminating. These unnecessary garbage collections
 
3527
            have now been eliminated.</p>
 
3528
          <p>Own Id: OTP-5693</p>
 
3529
        </item>
 
3530
      </list>
 
3531
    </section>
 
3532
 
 
3533
    <section>
 
3534
      <title>Improvements and New Features</title>
 
3535
      <list type="bulleted">
 
3536
        <item>
 
3537
          <p>The <c><![CDATA[c:i/0]]></c> function will now run in a paged mode if
 
3538
            there are more than 100 processes in the system. (Thanks
 
3539
            to Ulf Wiger.)</p>
 
3540
          <p><c><![CDATA[erlang:system_info(process_count)]]></c> has
 
3541
            been optimized and does now return exactly the same value
 
3542
            as <c><![CDATA[length(processes())]]></c>. Previously
 
3543
            <c><![CDATA[erlang:system_info(process_count)]]></c> did not include
 
3544
            exiting processes which are included in
 
3545
            <c><![CDATA[length(processes())]]></c>.</p>
 
3546
          <p>The <c><![CDATA[+P]]></c> flag for <c><![CDATA[erl]]></c>, which sets the maximum
 
3547
            number of processes allowed to exist at the same, no longer
 
3548
            accepts values higher than 134217727. (You will still
 
3549
            probably run out of memory before you'll be able to reach
 
3550
            that limit.)</p>
 
3551
          <p>Own Id: OTP-5645 Aux Id: seq9984 </p>
 
3552
        </item>
 
3553
        <item>
 
3554
          <p>The term-building driver functions
 
3555
            <c><![CDATA[driver_output_term()]]></c> and <c><![CDATA[driver_send_term()]]></c>
 
3556
            have been updated:</p>
 
3557
          <p>The ERL_DRV_FLOAT type has been added.</p>
 
3558
          <p>For the ERL_DRV_BINARY type, the length and offset are
 
3559
            now validated against the length of the driver binary.</p>
 
3560
          <p>The ERL_DRV_PID type is now implemented (it was
 
3561
            documented, but not implemented).</p>
 
3562
          <p>Own Id: OTP-5674</p>
 
3563
        </item>
 
3564
      </list>
 
3565
    </section>
 
3566
  </section>
 
3567
 
 
3568
  <section>
 
3569
    <title>ERTS 5.4.8</title>
 
3570
 
 
3571
    <section>
 
3572
      <title>Fixed Bugs and Malfunctions</title>
 
3573
      <list type="bulleted">
 
3574
        <item>
 
3575
          <p><c><![CDATA[ets:delete/1]]></c> now allows other Erlang process to run
 
3576
            when a large table is being deleted.</p>
 
3577
          <p>Own Id: OTP-5572</p>
 
3578
        </item>
 
3579
        <item>
 
3580
          <p>A bug regarding tcp sockets which results in hanging
 
3581
            <c><![CDATA[gen_tcp:send/2]]></c> has been corrected. To encounter
 
3582
            this bug you needed one process that read from a socket,
 
3583
            one that wrote more date than the reader read out so the
 
3584
            sender got suspended, and then the reader closed the
 
3585
            socket. (Reported and diagnosed by Alexey Shchepin.)</p>
 
3586
          <p>Corrected a bug in the (undocumented and unsupported)
 
3587
            option <c><![CDATA[{packet,http}]]></c> for <c><![CDATA[gen_tcp.]]></c>
 
3588
            (Thanks to Claes Wikstrom and Luke Gorrie.)</p>
 
3589
          <p>Updated the documentation regarding the second argument to
 
3590
            <c><![CDATA[gen_tcp:recv/2]]></c>, the <c><![CDATA[Length]]></c> to receive.</p>
 
3591
          <p>Own Id: OTP-5582 Aux Id: seq9839 </p>
 
3592
        </item>
 
3593
        <item>
 
3594
          <p>Erlang/OTP will now build on Mac OS X 10.4 "Tiger" (the
 
3595
            problem was that 10.4 has a partially implemented poll()
 
3596
            function that can't handle devices). Also, on Mac OS X
 
3597
            10.3 "Panther", Erlang/OTP will now use select() instead
 
3598
            of poll() (because poll() on Mac OS X 10.3 is implemented
 
3599
            using select()).</p>
 
3600
          <p>Own Id: OTP-5595</p>
 
3601
        </item>
 
3602
        <item>
 
3603
          <p>A bug in the file driver when opening a file in
 
3604
            compressed mode, and the returned allocated pointer from
 
3605
            the compressing library was in very high memory (&gt;= 2GB),
 
3606
            causing e.g. <c><![CDATA[file:read/2]]></c> to return
 
3607
            <c><![CDATA[{error,ebadf}]]></c>, has been corrected.</p>
 
3608
          <p>Own Id: OTP-5618</p>
 
3609
        </item>
 
3610
      </list>
 
3611
    </section>
 
3612
 
 
3613
    <section>
 
3614
      <title>Improvements and New Features</title>
 
3615
      <list type="bulleted">
 
3616
        <item>
 
3617
          <p>The new fun <c><![CDATA[M:F/A]]></c> construct creates a fun that
 
3618
            refers to the latest version of <c><![CDATA[M:F/A.]]></c> This syntax is
 
3619
            meant to replace tuple funs <c><![CDATA[{M,F}]]></c> which have many
 
3620
            problems.</p>
 
3621
          <p>The new type test <c><![CDATA[is_function(Fun,A)]]></c> (which may be
 
3622
            used in guards) test whether <c><![CDATA[Fun]]></c> is a fun that can be
 
3623
            applied with <c><![CDATA[A]]></c> arguments. (Currently, <c><![CDATA[Fun]]></c>
 
3624
            can also be a tuple fun.)</p>
 
3625
          <p>Own Id: OTP-5584</p>
 
3626
        </item>
 
3627
        <item>
 
3628
          <p>In the HiPE application, there's a new experimental
 
3629
            register allocator (optimistic coalescing), and the
 
3630
            linear scan register allocator is now also available on
 
3631
            ppc. Plus lots of cleanups.</p>
 
3632
          <p>Minor hybrid heap corrections.</p>
 
3633
          <p>The maximum size of a heap used to be articially
 
3634
            limited so that the size of a heap would fit in 28 bits;
 
3635
            that limitation could cause the emulator to terminate in
 
3636
            a garbage collection even if there still was available
 
3637
            memory. Now the largest heap size for a 32 bit CPU is
 
3638
            1,699,221,830 bytes. (Thanks to Jesper Wilhelmsson.)</p>
 
3639
          <p>Also removed the undocumented <c><![CDATA[+H]]></c> emulator option.</p>
 
3640
          <p>Own Id: OTP-5596</p>
 
3641
        </item>
 
3642
      </list>
 
3643
    </section>
 
3644
  </section>
 
3645
 
 
3646
  <section>
 
3647
    <title>ERTS 5.4.7</title>
 
3648
 
 
3649
    <section>
 
3650
      <title>Fixed Bugs and Malfunctions</title>
 
3651
      <list type="bulleted">
 
3652
        <item>
 
3653
          <p><c><![CDATA[to_erl]]></c> could close unexpectedly on Linux systems.
 
3654
            Also, output from the emulator could be lost. Corrected.</p>
 
3655
          <p>Own Id: OTP-5561</p>
 
3656
        </item>
 
3657
      </list>
 
3658
    </section>
 
3659
 
 
3660
    <section>
 
3661
      <title>Improvements and New Features</title>
 
3662
      <list type="bulleted">
 
3663
        <item>
 
3664
          <p>The <c><![CDATA[cpu_timestamp]]></c> option for <c><![CDATA[erlang:trace/3]]></c>
 
3665
            is now also supported on Linux.</p>
 
3666
          <p>Own Id: OTP-5532 Aux Id: seq9813 </p>
 
3667
        </item>
 
3668
        <item>
 
3669
          <p>The last known <c><![CDATA[werl]]></c> window size/position is now saved
 
3670
            correctly when <c><![CDATA[werl]]></c> is stopped with the window
 
3671
            minimized. A problem with the placement not being saved if
 
3672
            the emulator is halted or stopped from the JCL menu has also
 
3673
            been fixed.</p>
 
3674
          <p>Own Id: OTP-5544 Aux Id: OTP-5522 </p>
 
3675
        </item>
 
3676
      </list>
 
3677
    </section>
 
3678
  </section>
 
3679
 
 
3680
  <section>
 
3681
    <title>ERTS 5.4.6</title>
 
3682
 
 
3683
    <section>
 
3684
      <title>Fixed Bugs and Malfunctions</title>
 
3685
      <list type="bulleted">
 
3686
        <item>
 
3687
          <p>Some math libraries do not always throw floating-point
 
3688
            exceptions on errors. In order to be able to use these
 
3689
            libraries, floating-point errors are now more thoroughly
 
3690
            checked.</p>
 
3691
          <p>Misc floating-point fixes for Linux and MacOSX.</p>
 
3692
          <p>Own Id: OTP-5467</p>
 
3693
        </item>
 
3694
        <item>
 
3695
          <p>An internal buffer was sometimes not cleared which caused
 
3696
            garbage to appear in error messages sent to the error
 
3697
            logger.</p>
 
3698
          <p><c><![CDATA[errno]]></c> was sometimes clobbered which caused erroneous
 
3699
            error reports about <c><![CDATA[poll()]]></c> errors.</p>
 
3700
          <p>Only emulators on unix platforms were affected by these
 
3701
            bugs.</p>
 
3702
          <p>Own Id: OTP-5492</p>
 
3703
        </item>
 
3704
        <item>
 
3705
          <p>The ethread library now works on OpenBSD.</p>
 
3706
          <p>Own Id: OTP-5515</p>
 
3707
        </item>
 
3708
        <item>
 
3709
          <p>Corrected a bug in the (undocumented and unsupported)
 
3710
            option <c><![CDATA[{packet,http}]]></c> for <c><![CDATA[gen_tcp]]></c>.
 
3711
            (Thanks to Claes Wikstrom and Luke Gorrie.)</p>
 
3712
          <p>Own Id: OTP-5519</p>
 
3713
        </item>
 
3714
      </list>
 
3715
    </section>
 
3716
 
 
3717
    <section>
 
3718
      <title>Improvements and New Features</title>
 
3719
      <list type="bulleted">
 
3720
        <item>
 
3721
          <p><c><![CDATA[binary_to_term/1]]></c> could cause the emulator to crash
 
3722
            when given invalid pids or funs.</p>
 
3723
          <p>Own Id: OTP-5484 Aux Id: seq9801 </p>
 
3724
        </item>
 
3725
        <item>
 
3726
          <p>Some more stability problems were fixed in the
 
3727
            hybrid-heap emulator.</p>
 
3728
          <p>Own Id: OTP-5489</p>
 
3729
        </item>
 
3730
        <item>
 
3731
          <p>After <c><![CDATA[werl]]></c> was closed with the window minimized, it
 
3732
            was not possible to restart <c><![CDATA[werl]]></c> with an open
 
3733
            window. A temporary solution has so far been implemented
 
3734
            that restores the initial window settings every time
 
3735
            <c><![CDATA[werl]]></c> is started.</p>
 
3736
          <p>Own Id: OTP-5522</p>
 
3737
        </item>
 
3738
      </list>
 
3739
    </section>
 
3740
  </section>
 
3741
 
 
3742
  <section>
 
3743
    <title>ERTS 5.4.5</title>
 
3744
 
 
3745
    <section>
 
3746
      <title>Fixed Bugs and Malfunctions</title>
 
3747
      <list type="bulleted">
 
3748
        <item>
 
3749
          <p>If a process had node links (created by
 
3750
            <c><![CDATA[monitor_node/2]]></c>), excuting
 
3751
            <c><![CDATA[process_info(Pid,memory)]]></c> for that process would
 
3752
            crash the emulator.</p>
 
3753
          <p>Own Id: OTP-5420</p>
 
3754
        </item>
 
3755
        <item>
 
3756
          <p>Minor corrections to the help text printed by <c><![CDATA[erlc -help]]></c>. The documentation for <c><![CDATA[erlc]]></c> was also
 
3757
            slightly updated.</p>
 
3758
          <p>Own Id: OTP-5428</p>
 
3759
        </item>
 
3760
        <item>
 
3761
          <p>32-bit words were used for offsets in the garbage
 
3762
            collector. This caused the emulator to crash on 64-bit
 
3763
            machines when heaps were moved more than 4 GB during
 
3764
            garbage collection.</p>
 
3765
          <p>Own Id: OTP-5430</p>
 
3766
        </item>
 
3767
        <item>
 
3768
          <p><c><![CDATA[is_boolean(42.5)]]></c> failed to load if optimization was
 
3769
            explicitly turned off.</p>
 
3770
          <p>Own Id: OTP-5448</p>
 
3771
        </item>
 
3772
        <item>
 
3773
          <p>If there was a call to <c><![CDATA[Module:foo/X]]></c> from any loaded
 
3774
            module, the returned by <c><![CDATA[M:module_info(exports)]]></c> would
 
3775
            always include <c><![CDATA[{foo,X}]]></c> (even though
 
3776
            <c><![CDATA[Module:foo/X]]></c> if was not defined).</p>
 
3777
          <p>Own Id: OTP-5450 Aux Id: seq9722 </p>
 
3778
        </item>
 
3779
      </list>
 
3780
    </section>
 
3781
 
 
3782
    <section>
 
3783
      <title>Improvements and New Features</title>
 
3784
      <list type="bulleted">
 
3785
        <item>
 
3786
          <p>The <c><![CDATA[c]]></c> option for the <c><![CDATA[+B]]></c> flag has been
 
3787
            introduced which makes it possible to use Ctrl-C
 
3788
            (Ctrl-Break on Windows) to interrupt the shell process
 
3789
            rather than to invoke the emulator break handler. All new
 
3790
            <c><![CDATA[+B]]></c> options are also supported on Windows
 
3791
            (<c><![CDATA[werl]]></c>) as of now. Furthermore, Ctrl-C on Windows has
 
3792
            now been reserved for copying text (what Ctrl-Ins was used
 
3793
            for previously). Ctrl-Break should be used for break
 
3794
            handling. Lastly, the documentation of the system flags has
 
3795
            been updated.</p>
 
3796
          <p>Own Id: OTP-5388</p>
 
3797
        </item>
 
3798
      </list>
 
3799
    </section>
 
3800
  </section>
 
3801
 
 
3802
  <section>
 
3803
    <title>ERTS 5.4.4</title>
 
3804
 
 
3805
    <section>
 
3806
      <title>Fixed Bugs and Malfunctions</title>
 
3807
      <list type="bulleted">
 
3808
        <item>
 
3809
          <p>The function <c><![CDATA[erlang:float/1]]></c> can now be used in
 
3810
            match specifications and is recognized by
 
3811
            <c><![CDATA[dbg:fun2ms/1]]></c> and <c><![CDATA[ets:fun2ms/1]]></c>. This
 
3812
            addition is part of the work to "harmonize" match
 
3813
            specification guards with Erlang guards.</p>
 
3814
          <p>Own Id: OTP-5297 Aux Id: OTP-4927 </p>
 
3815
        </item>
 
3816
        <item>
 
3817
          <p>The <c><![CDATA[register/2]]></c> BIF would return <c><![CDATA[true]]></c> even if
 
3818
            the second argument was not a pid for living process.
 
3819
            Corrected to cause an exception.</p>
 
3820
          <p>Own Id: OTP-5324 Aux Id: seq9698 </p>
 
3821
        </item>
 
3822
        <item>
 
3823
          <p>In the 'bag' type of ets tables, elements having the same
 
3824
            key were supposed to be order in insertion order. The
 
3825
            would be wrong if a rehash occurred.</p>
 
3826
          <p>Own Id: OTP-5340 Aux Id: seq9704 </p>
 
3827
        </item>
 
3828
        <item>
 
3829
          <p>Linked in drivers in the Crypto and Asn1 applications
 
3830
            are now compiled with the <c><![CDATA[-D_THREAD_SAFE]]></c> and
 
3831
            <c><![CDATA[-D_REENTRANT]]></c> switches on unix when the emulator has
 
3832
            thread support enabled.</p>
 
3833
          <p>Linked in drivers on MacOSX are not compiled with the
 
3834
            undocumented <c><![CDATA[-lbundle1.o]]></c> switch anymore. Thanks to
 
3835
            Sean Hinde who sent us a patch.</p>
 
3836
          <p>Linked in driver in Crypto, and port programs in SSL, now
 
3837
            compiles on OSF1.</p>
 
3838
          <p>Minor makefile improvements in Runtime_Tools.</p>
 
3839
          <p>Own Id: OTP-5346</p>
 
3840
        </item>
 
3841
        <item>
 
3842
          <p>Fixed a bug in the hybrid heap in distributed send
 
3843
            operations.</p>
 
3844
          <p>Own Id: OTP-5361</p>
 
3845
        </item>
 
3846
        <item>
 
3847
          <p>A BIF <c><![CDATA[erlang:raise/3]]></c> has been added. See the manual
 
3848
            for details. It is intended for internal system programming
 
3849
            only, advanced error handling.</p>
 
3850
          <p>Own Id: OTP-5376 Aux Id: OTP-5257 </p>
 
3851
        </item>
 
3852
        <item>
 
3853
          <p>Mikael Pettersson (HiPE) corrected a few bugs in the
 
3854
            emulator that caused problems when compiled with the
 
3855
            experimental gcc-4.0.0.</p>
 
3856
          <p>Own Id: OTP-5386</p>
 
3857
        </item>
 
3858
      </list>
 
3859
    </section>
 
3860
 
 
3861
    <section>
 
3862
      <title>Improvements and New Features</title>
 
3863
      <list type="bulleted">
 
3864
        <item>
 
3865
          <p>Minor update of the internal documentation of
 
3866
            the <c><![CDATA[epmd]]></c> protocol.</p>
 
3867
          <p>The listen port of <c><![CDATA[epmd]]></c> has now been registered at
 
3868
            IANA:
 
3869
            <url href="http://www.iana.org/assignments/port-numbers">http://www.iana.org/assignments/port-numbers</url>.</p>
 
3870
          <p>Own Id: OTP-5234</p>
 
3871
        </item>
 
3872
        <item>
 
3873
          <p><c><![CDATA[run_erl.c]]></c> now works on Mac OS X and FreeBSD.</p>
 
3874
          <p>Own Id: OTP-5384</p>
 
3875
        </item>
 
3876
        <item>
 
3877
          <p>A few bugs were corrected in the HiPE application.</p>
 
3878
          <p>Own Id: OTP-5385</p>
 
3879
        </item>
 
3880
      </list>
 
3881
    </section>
 
3882
  </section>
 
3883
 
 
3884
  <section>
 
3885
    <title>ERTS 5.4.3</title>
 
3886
 
 
3887
    <section>
 
3888
      <title>Fixed Bugs and Malfunctions</title>
 
3889
      <list type="bulleted">
 
3890
        <item>
 
3891
          <p>Font and color preferences for <c><![CDATA[werl.exe]]></c> now can be
 
3892
            saved even after the first time you run <c><![CDATA[werl.exe]]></c>.
 
3893
            The window position and size is also saved. Patch from
 
3894
            James Hague who did all the hard work.</p>
 
3895
          <p>Own Id: OTP-5250</p>
 
3896
        </item>
 
3897
        <item>
 
3898
          <p>OTP archive libraries, e.g. the <c><![CDATA[erl_interface]]></c>
 
3899
            library, on MacOSX could not be used without first
 
3900
            rerunning <c><![CDATA[ranlib]]></c> on them. This bug has now been
 
3901
            fixed.</p>
 
3902
          <p>Own Id: OTP-5274</p>
 
3903
        </item>
 
3904
        <item>
 
3905
          <p>Bugs in <c><![CDATA[erlang:hash/2]]></c> and <c><![CDATA[erlang:phash/2]]></c> on
 
3906
            64-bit platforms have been fixed.</p>
 
3907
          <p>Own Id: OTP-5292</p>
 
3908
        </item>
 
3909
      </list>
 
3910
    </section>
 
3911
 
 
3912
    <section>
 
3913
      <title>Improvements and New Features</title>
 
3914
      <list type="bulleted">
 
3915
        <item>
 
3916
          <p>Corrected a crash in the 64-bits emulator.</p>
 
3917
          <p>Corrected a problem in the hybrid heap emulator.</p>
 
3918
          <p>In the chapter about the abstract format in the ERTS User's
 
3919
            Guide, updated the last section about how the abstract
 
3920
            format is stored in BEAM files.</p>
 
3921
          <p>Own Id: OTP-5262</p>
 
3922
        </item>
 
3923
        <item>
 
3924
          <p>The maximum number of concurrent threads in the internal
 
3925
            ethread thread package has been limited to 2048.</p>
 
3926
          <p>Own Id: OTP-5280</p>
 
3927
        </item>
 
3928
      </list>
 
3929
    </section>
 
3930
  </section>
 
3931
 
 
3932
  <section>
 
3933
    <title>ERTS 5.4.2.1</title>
 
3934
 
 
3935
    <section>
 
3936
      <title>Improvements and New Features</title>
 
3937
      <list type="bulleted">
 
3938
        <item>
 
3939
          <p>If Erlang/OTP was installed in a short directory name,
 
3940
            such as <c><![CDATA[C:\\Program\\erl5.4.2]]></c>, the emulator would not
 
3941
            start.</p>
 
3942
          <p>Own Id: OTP-5254</p>
 
3943
        </item>
 
3944
      </list>
 
3945
    </section>
 
3946
  </section>
 
3947
 
 
3948
  <section>
 
3949
    <title>ERTS 5.4.2</title>
 
3950
 
 
3951
    <section>
 
3952
      <title>Fixed Bugs and Malfunctions</title>
 
3953
      <list type="bulleted">
 
3954
        <item>
 
3955
          <p>If one used <c><![CDATA[select/3]]></c> and <c><![CDATA[select/1]]></c> on a
 
3956
            non-fixed ETS table and deleted objects simultaneously,
 
3957
            the emulator could crash. Note that the result of such
 
3958
            simultaneous operations on tables that are not in a fixed
 
3959
            state is still undefined, but the emulator crash is,
 
3960
            needless to say, fixed.</p>
 
3961
          <p>Own Id: OTP-5209 Aux Id: seq9198 </p>
 
3962
        </item>
 
3963
        <item>
 
3964
          <p>Arithmetic with big numbers could crash the emulator.</p>
 
3965
          <p>The HiPE native code compiler and run-time code in the
 
3966
            emulator has been updated. (Note: Native code is still
 
3967
            not supported.)</p>
 
3968
          <p>Eliminated a few bugs that could crash the hybrid emulator
 
3969
            (which is not supported).</p>
 
3970
          <p>Own Id: OTP-5233 Aux Id: seq9587 </p>
 
3971
        </item>
 
3972
      </list>
 
3973
    </section>
 
3974
  </section>
 
3975
 
 
3976
  <section>
 
3977
    <title>ERTS 5.4.1</title>
 
3978
 
 
3979
    <section>
 
3980
      <title>Fixed Bugs and Malfunctions</title>
 
3981
      <list type="bulleted">
 
3982
        <item>
 
3983
          <p>The ethread library was unnecessarily rebuilt multiple
 
3984
            times during the build process, also a debug version of
 
3985
            the library was build during the install phase. These
 
3986
            unnecessary builds have now been removed. Note, the
 
3987
            content of the installed Erlang/OTP system is not
 
3988
            effected at all by this change.</p>
 
3989
          <p>Own Id: OTP-5203</p>
 
3990
        </item>
 
3991
        <item>
 
3992
          <p>The emulator could fail to clear the memory segment
 
3993
            cache. This could potentially cause memory allocation to
 
3994
            unnecessarily fail when memory usage was close to its
 
3995
            maximum. This bug has now been fixed.</p>
 
3996
          <p>Own Id: OTP-5211</p>
 
3997
        </item>
 
3998
        <item>
 
3999
          <p>std_alloc (std short for standard) was sometimes called
 
4000
            def_alloc (def short for default). std_alloc is now
 
4001
            everywhere refered to as std_alloc.</p>
 
4002
          <p>Own Id: OTP-5216</p>
 
4003
        </item>
 
4004
        <item>
 
4005
          <p>A documentation bug has been corrected in
 
4006
            the <c><![CDATA[erts_alloc(3)]]></c> documentation. It was stated that
 
4007
            some of the memory allocators present were by default
 
4008
            disabled. This is true for Erlang/OTP R9C, but is not true
 
4009
            for Erlang/OTP R10B. In R10B all memory allocators present
 
4010
            are enabled by default.</p>
 
4011
          <p>Own Id: OTP-5217</p>
 
4012
        </item>
 
4013
      </list>
 
4014
    </section>
 
4015
 
 
4016
    <section>
 
4017
      <title>Improvements and New Features</title>
 
4018
      <list type="bulleted">
 
4019
        <item>
 
4020
          <p>The emulator now close all open files and sockets
 
4021
            immediately after receiving an USR1 signal. This causes
 
4022
            the emulator to unregister at <c><![CDATA[epmd]]></c> as early as
 
4023
            possible.</p>
 
4024
          <p>Own Id: OTP-5221 Aux Id: OTP-4985, seq9514 </p>
 
4025
        </item>
 
4026
        <item>
 
4027
          <p>Try/catch support in the emulator slightly updated.</p>
 
4028
          <p>Own Id: OTP-5229</p>
 
4029
        </item>
 
4030
      </list>
 
4031
    </section>
 
4032
  </section>
 
4033
</chapter>
 
4034