Erlang/OTP 19.3

This release of Erlang/OTP can be built from source or installed using pre-built packages for your OS or third-party tools (such as kerl or asdf).

docker run -it erlang:19.3

Highlights #

OTP-14169
Application(s):
crypto, ssh
Related Id(s):
seq13261

The implementation of the key exchange algorithms diffie-hellman-group-exchange-sha* are optimized, up to a factor of 11 for the slowest ( = biggest and safest) group size.

common_test-1.14 #

The common_test-1.14 application can be applied independently of other applications on a full OTP 19 installation.

OTP-10599
Application(s):
common_test
Related Id(s):
[255] , kunagi-344

The following corrections and improvements are done in the common_test hook handling:

-- An extra argument, Suite, is added as the first argument to each of the following hook callback functions:

-- pre_init_per_group

-- post_init_per_group

-- pre_end_per_group

-- post_end_per_group

-- pre_init_per_testcase

-- post_init_per_testcase

-- pre_end_per_testcase

-- post_end_per_testcase

-- on_tc_fail

-- on_tc_skip

For backwards compatibility, if the new function is not exported from a hook callback module, common_test will fall back to the old interface and call the function without the Suite argument.

-- If either init_per_suite or end_per_suite exists, but not the other, then the non-existing function will be reported as failed with reason undef in the test log. The same goes for init/end_per_group. This has always been a requirement according to the user's guide, but now common_test is more explicit in the report.

-- If init_per_suite was exported from a test suite, but not end_per_suite, then pre/post_end_per_suite was called with Suite=ct_framework instead of the correct suite name. This is now corrected.

-- If end_per_group was exported from a suite, but not init_per_group, then end_per_group was never called. This is now corrected.

-- Tests that were skipped before calling pre_init_per_* got faulty calls to the corresponding post_init_per_*. E.g. if a test was skipped because suite/0 failed, then post_init_per_suite would be called even though pre_init_per_suite and init_per_suite were not called. This is now corrected so a post_* callback will never be called unless the corresponding pre_* callback has been called first.

-- Tests that were skipped before or in init_per_testcase got faulty calls to pre_end_per_testcase and post_end_per_testcase. This is now corrected so pre/post_end_per_testcase are not called when end_per_testcase is not called.

-- If an exit signal causes the test case process to die while running init_per_testcase, the case was earlier reported as failed with reason {skip,...}. This is now corrected so the case will be marked as skipped.

-- If an exist signal causes the test case process to die while running end_per_testcase, the case was earlier marked as failed. This is now corrected so the status of the test case is not changed - there is only a warning added to the comment field.

-- If a test case was skipped because of option {force_stop,skip_rest} or because of a failed sequence, then no tc_start event would be sent, only tc_done. This is now corrected so both events are sent.

-- When skipping or failing in a configuration function, the configuration function itself would get {auto_skipped,Reason}, {skipped,Reason} or {failed,Reason} in the hook callbacks on_tc_skip or on_tc_fail. The other test cases that were skipped as a result of this would only get Reason in on_tc_skip. This is now corrected so even the configuration function that caused the skip/fail will only get Reason in the hook callback.

OTP-14129
Application(s):
common_test
Related Id(s):
seq13244

When a test case was skipped by a skip_cases statement in a test spec, then cth_surefire would erroneously mark the previous test case as skipped in the xml report. The actually skipped test case would not be present in the xml report at all. This is now corrected.

OTP-14210
Application(s):
common_test

The multiply_timetraps and scale_timetraps options did not work with test specifications, which has been corrected.

OTP-14132
Application(s):
common_test

ct_testspec:get_tests/1 is added. This is used by rebar3 to get all directories that must be compiled when running tests from testspec - instead of implementing testspec parsing in rebar3.

Full runtime dependencies of common_test-1.14: compiler-6.0, crypto-3.6, debugger-4.1, erts-7.0, inets-6.0, kernel-4.0, observer-2.1, runtime_tools-1.8.16, sasl-2.4.2, snmp-5.1.2, ssh-4.0, stdlib-2.5, syntax_tools-1.7, tools-2.8, xmerl-1.3.8

compiler-7.0.4 #

The compiler-7.0.4 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14240
Application(s):
compiler

Minor internal changes. A typo in the documentation was also fixed.

Full runtime dependencies of compiler-7.0.4: crypto-3.6, erts-7.0, hipe-3.12, kernel-4.0, stdlib-2.5

crypto-3.7.3 #

The crypto-3.7.3 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14169
Application(s):
crypto, ssh
Related Id(s):
seq13261

*** HIGHLIGHT ***

The implementation of the key exchange algorithms diffie-hellman-group-exchange-sha* are optimized, up to a factor of 11 for the slowest ( = biggest and safest) group size.

Full runtime dependencies of crypto-3.7.3: erts-6.0, kernel-3.0, stdlib-2.0

dialyzer-3.1 #

Note! The dialyzer-3.1 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependency has to be satisfied: -- hipe-3.15.4 (first satisfied in OTP 19.3)

OTP-14130
Application(s):
dialyzer, hipe, typer

Fix a bug concerning parameterized opaque types.

OTP-14177
Application(s):
dialyzer

Improve a few warnings. One of them could cause a crash.

OTP-14249
Application(s):
dialyzer, observer
Related Id(s):
ERL-161

The dialyzer and observer applications will now use a portable way to find the home directory. That means that there is no longer any need to manually set the HOME environment variable on Windows.

OTP-14126
Application(s):
dialyzer
Related Id(s):
ERL-308

The peak memory consumption is reduced.

The evaluation of huge SCCs in dialyzer_typesig is optimized.

Analyzing modules with binary construction with huge strings is now much faster.

Full runtime dependencies of dialyzer-3.1: compiler-7.0, erts-8.0, hipe-3.15.4, kernel-5.0, stdlib-3.0, syntax_tools-2.0, wx-1.2

diameter-1.12.2 #

The diameter-1.12.2 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14206
Application(s):
diameter

An improvement in the handling of peer failover in diameter 1.12.1 adversely affected performance when sending requests. Further, the inefficient use of a public table to route incoming answers has been removed.

OTP-14269
Application(s):
diameter, hipe, reltool

Fixed xml issues in old release notes

Full runtime dependencies of diameter-1.12.2: erts-6.0, kernel-3.0, ssl-5.3.4, stdlib-2.0

erl_interface-3.9.3 #

The erl_interface-3.9.3 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14233
Application(s):
erl_interface
Related Id(s):
PR-1343

Minor documentation update

erts-8.3 #

Note! The erts-8.3 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependency has to be satisfied: -- sasl-3.0.1 (first satisfied in OTP 19.1)

OTP-14055
Application(s):
erts

Fixed a number of bugs that caused faulty stack-traces to be generated. The faulty stack traces were generated either when applying the following functions or tracing the following functions:

-- erlang:error/1

-- erlang:error/2

-- erlang:exit/1

-- erlang:throw/1

OTP-14118
Application(s):
erts

Corrected documentation about memory footprint for maps.

OTP-14119
Application(s):
erts
Related Id(s):
PR-1263

Fix process_info(Pid, current_stacktrace) to use stack depth limit set by system_flag(backtrace_depth). The old behavior was a hard coded depth limit of 8.

OTP-14121
Application(s):
erts

A process calling erlang:system_flag(multi_scheduling, block) could end up hanging forever in the call.

OTP-14122
Application(s):
erts

Dirty scheduler bug fixes:

-- Fixed call time tracing of process being scheduled on dirty scheduler.

-- GC info from dirty schedulers.

-- Multi scheduling block with dirty schedulers could crash the runtime system.

-- Process structures could be removed prematurely.

-- GC on dirty scheduler could crash the runtime system.

-- Termination of a process executing on a dirty scheduler could cause a runtime system crash.

OTP-14133
Application(s):
erts

Fixed crash that occurred when writing timer data to a crash dump.

OTP-14134
Application(s):
erts

A literal area could be removed while still referred from processes.

OTP-14135
Application(s):
erts

Fixed a bug in the garbage collector that could crash the runtime system.

OTP-14136
Application(s):
erts

Fixed a bug in call-time trace for NIFs which caused tracing to erroneously be started multiple times for one call.

OTP-14153
Application(s):
erts

Remove a debug printout and an unnecessary garbage collection when handling exceptions in hipe compiled code.

OTP-14154
Application(s):
erts

Fix bug in tracing of garbage collection that could cause VM crash. Bug exists since OTP 19.0.

OTP-14159
Application(s):
erts
Related Id(s):
ERL-340

Fix bug in binary_to_term for binaries created by term_to_binary with option compressed. The bug can cause badarg exception for a valid binary when Erlang VM is linked against a zlib library of version 1.2.9 or newer. Bug exists since OTP 17.0.

OTP-14164
Application(s):
erts

Fix suspension of schedulers when generating a crashdump.

OTP-14202
Application(s):
erts

NIF resources was not handled in a thread-safe manner in the runtime system without SMP support.

As a consequence of this fix, the following driver functions are now thread-safe also in the runtime system without SMP support:

-- driver_free_binary()

-- driver_realloc_binary()

-- driver_binary_get_refc()

-- driver_binary_inc_refc()

-- driver_binary_dec_refc()

OTP-14227
Application(s):
erts

Fix erlang:round/1 for large floating point numbers with an odd absolute value between (1 bsl 52) and (1 bsl 53). The result was falsely calculated as the next higher even number even though all integer values up to (1 bsl 53) can be represented as floats with full precision.

OTP-14228
Application(s):
erts

Add size of literals to module code size in crash dump and (l)oaded command in break menu like it used to be before OTP-19.0.

OTP-14229
Application(s):
erts

Fix potential bug in enif_send when called without a process context and with argument msg_env as NULL.

OTP-14231
Application(s):
erts

Fix bug where passing an appendable binary to erlang:port_control() could crash the emulator.

OTP-14241
Application(s):
erts
Related Id(s):
ERL-365

Receive expressions with timeout in the Erlang shell could cause a VM crash.

OTP-14085
Application(s):
erts

A received SIGTERM signal to beam will generate a 'stop' message to the init process and terminate the Erlang VM nicely. This is equivalent to calling init:stop/0.

OTP-14165
Application(s):
erts
Related Id(s):
ERL-319

Workaround for buggy Android implementation of PTHREAD_STACK_MIN causing build of runtime system to crash on undeclared PAGE_SIZE.

OTP-14234
Application(s):
erts

Add configure option --without-thread-names that removes the naming of individual emulator threads.

OTP-14254
Application(s):
erts
Related Id(s):
ERL-362

Add warning in documentation of zlib:deflateInit/6 about option WindowsBits values 8 and -8.

Full runtime dependencies of erts-8.3: kernel-5.0, sasl-3.0.1, stdlib-3.0

hipe-3.15.4 #

The hipe-3.15.4 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14130
Application(s):
dialyzer, hipe, typer

Fix a bug concerning parameterized opaque types.

OTP-14269
Application(s):
diameter, hipe, reltool

Fixed xml issues in old release notes

Full runtime dependencies of hipe-3.15.4: compiler-5.0, erts-7.1, kernel-3.0, stdlib-2.5, syntax_tools-1.6.14

inets-6.3.6 #

The inets-6.3.6 application can be applied independently of other applications on a full OTP 19 installation.

OTP-13571
Application(s):
inets
Related Id(s):
ERL-116

Chunk size decoding could fail. The symptom was that chunk decoding sometimes failed depending on timing of the received stream. If chunk size was split into two different packets decoding would fail.

OTP-14091
Application(s):
inets

Prevent httpc user process to hang if httpc_handler process terminates unexpectedly

OTP-14097
Application(s):
inets

Correct Host header, to include port number, when redirecting requests.

OTP-14173
Application(s):
inets
Related Id(s):
seq13262

Shutdown gracefully on connection or TLS handshake errors

Full runtime dependencies of inets-6.3.6: erts-6.0, kernel-3.0, mnesia-4.12, runtime_tools-1.8.14, ssl-5.3.4, stdlib-2.0

kernel-5.2 #

Note! The kernel-5.2 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependency has to be satisfied: -- erts-8.1 (first satisfied in OTP 19.1)

OTP-14232
Application(s):
kernel
Related Id(s):
seq13275

Fix a race during cleanup of os:cmd that would cause os:cmd to hang indefinitely.

OTP-14191
Application(s):
kernel

The functions in the 'file' module that take a list of paths (e.g. file:path_consult/2) will now continue to search in the path if the path contains something that is not a directory.

OTP-14192
Application(s):
kernel

Two OTP processes that are known to receive many messages are 'rex' (used by 'rpc') and 'error_logger'. Those processes will now store unprocessed messages outside the process heap, which will potentially decrease the cost of garbage collections.

Full runtime dependencies of kernel-5.2: erts-8.1, sasl-3.0, stdlib-3.0

observer-2.3.1 #

The observer-2.3.1 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14090
Application(s):
observer, runtime_tools
Related Id(s):
seq13232

etop erroneously reported the average scheduler utilization since the tool was first started instead of the scheduler utilization since last update. This is now corrected.

OTP-14093
Application(s):
observer
Related Id(s):
ERL-318

crashdump_viewer crashed when the 'Slogan' had more than one line. This is now corrected.

OTP-14151
Application(s):
observer
Related Id(s):
PR-1296

When clicking an HTML-link to a port before the port tab has been opened for the first time, observer would crash since port info is not initiated. This is now corrected.

OTP-14249
Application(s):
dialyzer, observer
Related Id(s):
ERL-161

The dialyzer and observer applications will now use a portable way to find the home directory. That means that there is no longer any need to manually set the HOME environment variable on Windows.

Full runtime dependencies of observer-2.3.1: erts-7.0, et-1.5, inets-5.10, kernel-3.0, runtime_tools-1.8.14, stdlib-2.0, wx-1.2

os_mon-2.4.2 #

The os_mon-2.4.2 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14161
Application(s):
os_mon
Related Id(s):
PR-1309

Support s390x in os_mon.

Full runtime dependencies of os_mon-2.4.2: erts-6.0, kernel-3.0, mnesia-4.12, otp_mibs-1.0.9, sasl-2.4, snmp-4.25.1, stdlib-2.0

public_key-1.4 #

The public_key-1.4 application can be applied independently of other applications on a full OTP 19 installation.

OTP-13009
Application(s):
public_key

New function pkix_verify_hostname/2,3 Implements certificate hostname checking. See the manual and RFC 6125.

OTP-14223
Application(s):
public_key, ssh

The ssh host key fingerprint generation now also takes a list of algorithms and returns a list of corresponding fingerprints. See public_key:ssh_hostkey_fingerprint/2 and the option silently_accept_hosts in ssh:connect.

Full runtime dependencies of public_key-1.4: asn1-3.0, crypto-3.3, erts-6.0, kernel-3.0, stdlib-2.0

reltool-0.7.3 #

The reltool-0.7.3 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14269
Application(s):
diameter, hipe, reltool

Fixed xml issues in old release notes

Full runtime dependencies of reltool-0.7.3: erts-7.0, kernel-3.0, sasl-2.4, stdlib-2.0, tools-2.6.14, wx-1.2

runtime_tools-1.11.1 #

The runtime_tools-1.11.1 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14090
Application(s):
observer, runtime_tools
Related Id(s):
seq13232

etop erroneously reported the average scheduler utilization since the tool was first started instead of the scheduler utilization since last update. This is now corrected.

Full runtime dependencies of runtime_tools-1.11.1: erts-8.0, kernel-5.0, mnesia-4.12, stdlib-3.0

sasl-3.0.3 #

Note! The sasl-3.0.3 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependency has to be satisfied: -- erts-8.1 (first satisfied in OTP 19.1)

OTP-14170
Application(s):
sasl

When both options 'warnings_as_errors' and 'silent' were given to systools:make_script or systools:make_relup, no error reason would be returned if warnings occurred. Instead only the atom 'error' was returned. This is now corrected.

Options 'warnings_as_errors' and 'no_warn_sasl' are now also allowed for systools:make_tar.

Full runtime dependencies of sasl-3.0.3: erts-8.1, kernel-5.0, stdlib-3.0, tools-2.6.14

snmp-5.2.5 #

The snmp-5.2.5 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14145
Application(s):
snmp
Related Id(s):
ERL-325

The SNMP MIB compiler has been fixed to compile MIBS with refinements on user types such as in RFC 4669 RADIUS-AUTH-SERVER-MIB.mib. Problem reported and researched by Kenneth Lakin and Daniel Goertzen.

See also: https://bugs.erlang.org/browse/ERL-325

Full runtime dependencies of snmp-5.2.5: crypto-3.3, erts-6.0, kernel-3.0, mnesia-4.12, runtime_tools-1.8.14, stdlib-2.5

ssh-4.4.1 #

Note! The ssh-4.4.1 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependencies have to be satisfied: -- crypto-3.7.3 (first satisfied in OTP 19.3) -- public_key-1.4 (first satisfied in OTP 19.3) -- stdlib-3.3 (first satisfied in OTP 19.3)

OTP-14108
Application(s):
ssh

Fix bug when opening connections. If the tcp setup failed, that would in some cases not result in an error return value.

OTP-14109
Application(s):
ssh

Reduce information leakage in case of decryption errors.

OTP-14166
Application(s):
ssh

The key exchange algorithm diffie-hellman-group-exchange-sha* has a server-option {dh_gex_limits,{Min,Max}}. There was a hostkey signature validation error on the client side if the option was used and the Min or the Max differed from the corresponding values obtained from the client.

This bug is now corrected.

OTP-14225
Application(s):
ssh
Related Id(s):
PR-1331 , PR-1335

The sftpd server now correctly uses root_dir and cwd when resolving file paths if both are provided. The cwd handling is also corrected.

Thanks to kape1395!

OTP-14230
Application(s):
ssh
Related Id(s):
ERL-364

Ssh_cli used a function that does not handle non-utf8 unicode correctly.

OTP-14169
Application(s):
crypto, ssh
Related Id(s):
seq13261

*** HIGHLIGHT ***

The implementation of the key exchange algorithms diffie-hellman-group-exchange-sha* are optimized, up to a factor of 11 for the slowest ( = biggest and safest) group size.

OTP-14223
Application(s):
public_key, ssh

The ssh host key fingerprint generation now also takes a list of algorithms and returns a list of corresponding fingerprints. See public_key:ssh_hostkey_fingerprint/2 and the option silently_accept_hosts in ssh:connect.

Full runtime dependencies of ssh-4.4.1: crypto-3.7.3, erts-6.0, kernel-3.0, public_key-1.4, stdlib-3.3

ssl-8.1.1 #

Note! The ssl-8.1.1 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependency has to be satisfied: -- stdlib-3.2 (first satisfied in OTP 19.2)

OTP-14100
Application(s):
ssl

Corrected termination behavior, that caused a PEM cache bug and sometimes resulted in connection failures.

OTP-14138
Application(s):
ssl

Fix bug that could hang ssl connection processes when failing to require more data for very large handshake packages. Add option max_handshake_size to mitigate DoS attacks.

OTP-14141
Application(s):
ssl

Improved support for CRL handling that could fail to work as intended when an id-ce-extKeyUsage was present in the certificate. Also improvements where needed to distributionpoint handling so that all revocations actually are found and not deemed to be not determinable.

OTP-14222
Application(s):
ssl

A TLS handshake might accidentally match old sslv2 format and ssl application would incorrectly aborted TLS handshake with ssl_v2_client_hello_no_supported. Parsing was altered to avoid this problem.

OTP-14235
Application(s):
ssl

Correct default cipher list to prefer AES 128 before 3DES

OTP-13874
Application(s):
ssl

Move PEM cache to a dedicated process, to avoid making the SSL manager process a bottleneck. This improves scalability of TLS connections.

Full runtime dependencies of ssl-8.1.1: crypto-3.3, erts-7.0, inets-5.10.7, kernel-3.0, public_key-1.2, stdlib-3.2

stdlib-3.3 #

The stdlib-3.3 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14098
Application(s):
stdlib

An escript with only two lines would not work.

OTP-14103
Application(s):
stdlib
Related Id(s):
ERL-313

Characters ($char) can be used in constant pattern expressions. They can also be used in types and contracts.

OTP-14131
Application(s):
stdlib

The signatures of erl_parse:anno_to_term/1 and erl_parse:anno_from_term/1 are corrected. Using these functions no longer results in false Dialyzer warnings.

OTP-14175
Application(s):
stdlib
Related Id(s):
seq13277

Pretty-printing of maps is improved.

OTP-14189
Application(s):
stdlib
Related Id(s):
ERL-348 , ERL-349

If any of the following functions in the zip module crashed, a file would be left open: extract(), unzip(), create(), or zip(). This has been corrected.

A zip file having a "Unix header" could not be unpacked.

OTP-14200
Application(s):
stdlib
Related Id(s):
ERL-352

Improve the Erlang shell's tab-completion of long names.

OTP-14248
Application(s):
stdlib
Related Id(s):
ERL-367

The reference manual for sys had some faulty information about the 'get_modules' message used by processes where modules change dynamically during runtime. The documentation is now corrected.

OTP-14114
Application(s):
stdlib

Bug fixes, new features and improvements to gen_statem:

A new type init_result/1 has replaced the old init_result/0, so if you used that old type (that was never documented) you have to change your code, which may be regarded as a potential incompatibility.

Changing callback modes after code change did not work since the new callback mode was not recorded. This bug has been fixed.

The event types state_timeout and {call,From} could not be generated with a {next_event,EventType,EventContent} action since they did not pass the runtime type check. This bug has now been corrected.

State entry calls can now be repeated using (new) state callback returns {repeat_state,...}, {repeat_state_and_data,_} and repeat_state_and_data.

There have been lots of code cleanup in particular regarding timer handling. For example is async cancel_timer now used. Error handling has also been cleaned up.

To align with probable future changes to the rest of gen_*, terminate/3 has now got a fallback and code_change/4 is not mandatory.

OTP-14215
Application(s):
stdlib

filename:safe_relative_path/1 to sanitize a relative path has been added.

Full runtime dependencies of stdlib-3.3: compiler-5.0, crypto-3.3, erts-8.0, kernel-5.0, sasl-3.0

tools-2.9.1 #

Note! The tools-2.9.1 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependency has to be satisfied: -- stdlib-3.1 (first satisfied in OTP 19.1)

OTP-14217
Application(s):
tools
Related Id(s):
PR-1282

Improved edoc support in emacs mode.

Full runtime dependencies of tools-2.9.1: compiler-5.0, erts-7.0, inets-5.10, kernel-3.0, runtime_tools-1.8.14, stdlib-3.1

typer-0.9.12 #

Note! The typer-0.9.12 application can *not* be applied independently of other applications on an arbitrary OTP 19 installation. On a full OTP 19 installation, also the following runtime dependencies have to be satisfied: -- dialyzer-3.1 (first satisfied in OTP 19.3) -- hipe-3.15.4 (first satisfied in OTP 19.3)

OTP-14130
Application(s):
dialyzer, hipe, typer

Fix a bug concerning parameterized opaque types.

Full runtime dependencies of typer-0.9.12: compiler-7.0, dialyzer-3.1, erts-8.0, hipe-3.15.4, kernel-5.0, stdlib-3.0

xmerl-1.3.13 #

The xmerl-1.3.13 application can be applied independently of other applications on a full OTP 19 installation.

OTP-14139
Application(s):
xmerl

The namespace_conformant option in xmerl_scan did not work when parsing documents without explicit XML namespace declaration.

OTP-14211
Application(s):
xmerl

Fix a "well-formedness" bug in the XML Sax parser so it returns an error if there are something more in the file after the matching document. If one using the xmerl_sax_parser:stream() a rest is allowed which then can be sent to a new call of xmerl_sax_parser:stream() to parse next document.

This is done to be compliant with XML conformance tests.

OTP-14212
Application(s):
xmerl

Fixed compiler and dialyzer warnings in the XML SAX parser.

OTP-14213
Application(s):
xmerl

Change how to interpret end of document in the XML SAX parser to comply with Tim Brays comment on the standard. This makes it possible to handle more than one doc on a stream, the standard makes it impossible to know when the document is ended without waiting for the next document (and not always even that).

Tim Brays comment:

Trailing "Misc"
The fact that you're allowed some trailing junk after the root element, I decided (but unfortunately too late) is a real design error in XML. If I'm writing a network client, I'm probably going to close the link as soon as a I see the root element end-tag, and not depend on the other end closing it down properly. Furthermore, if I want to send a succession of XML documents over a network link, if I find a processing instruction after a root element, is it a trailer on the previous document, or part of the prolog of the next?

Full runtime dependencies of xmerl-1.3.13: erts-6.0, kernel-3.0, stdlib-2.5

Thanks To #

Amir Ghassemi Nasr, Björn Gustavsson, Dave Jeffrey, Håkan Mattsson, Jing Peng, Karolis Petrauskas, Kim Shrier, Kostis Sagonas, Leo Liu, Magnus Henoch, Malcolm, Nico, Philip Cristiano, Péter Gömöri, Satyen Chimulkar, Shaun Mangelsdorf, Steven Danna, pulitta, visciang