Potential Incompatibilities

This document contains a list of potential incompatibilities between Erlang 5.5/OTP R11B (unpatched) and the previous version Erlang 5.4/OTP R10B (unpatched), and is an extract from the release notes for the respective applications.

Some of the potential incompatibilities listed below have been introduced in R10B patches, although as a general rule, this is avoided.

Note: This document was compiled at the time when R11B was released and does not list any potential incompatibilities introduced in R11B patches. If using a patched version of R11B, please refer to the README for the respective patches for information about additional potential incompatibilites.

## 1 Compiler

- The compiler options `ignore_try` and `ignore_cond`, which allowed code that used unquoted `try` or `cond` as atoms or record tags, has been removed. Old code that depended on the options need to be revised to have occurrences of `try` or `cond` as atom or record tags single-quoted. (Note: Although `cond` is a reserved keyword, there is no `cond` statement. It might be introduced in a future release.)
  Own Id: OTP-6058

## 2 Erts

- NOTE: The design of SMP support for drivers is ongoing. There will probably be incompatible driver changes (only affecting drivers run on the runtime system with SMP support) released as patches for R11B.
  Potential incompatibility: Previously, specific driver call-backs were always called from the same thread. This is not true in the runtime system with SMP support. Calls to call-backs will be made from different threads, e.g., two consecutive calls to exactly the same call-back can be made from two different threads. This will in most cases not be a problem. All calls to call-backs are synchronized, i.e., only one call-back will be called at a time.
  Own Id: OTP-6006 Aux Id: OTP-6095
- Linked-in driver modifications.
  - Linked-in drivers must be recompiled.
  - The `refc` field in the `ErlDrvBinary` type has been removed. The reference count can be accessed via API functions. For more information see the `erl_driver(1)` man page.
  Own Id: OTP-6095 Aux Id: OTP-6006

## 3 Inets

- The internal design of using blocking `gen_tcp:recv` with a timeout and retries resulted in code that was hard to get a good overview of, and ultimate led to situations where the client got the wrong answer or no answer at all. The errors where many times very timing dependent and mainly effected the chunk-related functions, so if you where lucky you probably would not have noticed. The internal design was changed to use `gen_tcp` active once semantics. The API is not effected except for the function `ftp:quote/2` which now returns a list of strings (ftp result lines) where the line endings "\r\n" has been removed. This was the original intention for the return value of `ftp:quote/2` but it was non trivial to make a good such solution with the old design and a compromise was made.
  Introduced in Inets 4.5
  Own Id: OTP-5623
- When generating dynamic HTTP response bodies the the default content-type is now set to "text/html" instead of "text/plain" which is more intuitive.
  Introduced in Inets 4.5
  Own Id: OTP-5626
- The ftp client now supports passive mode. Actually the ftp client will always try to use passive mode and if it fails it will use active mode instead. It is also possible to force the ftp client to use active mode, if that is desired, by calling `ftp:force_active/1` this way you can get the old behavior.
  Introduced in Inets 4.4.1
  Own Id: OTP-5148
- The pipeline timeout was changed to be zero by default to avoid that people by accident would create connection processes that never dies and eats up the socket resources.
  Introduced in Inets 4.3
  Own Id: OTP-5442

## 4 Kernel

- Previously `unlink/1` and `erlang:demonitor/2` behaved completely asynchronous. This had one undesirable effect, though. You could never know when you were guaranteed not to be affected by a link that you had unlinked or a monitor that you had demonitored.
  The new behavior of `unlink/1` and `erlang:demonitor/2` can be viewed as two operations performed atomically. Asynchronously send an unlink signal or a demonitor signal, and ignore any future results of the link or monitor.
  NOTE: This change can cause some obscure code to fail which previously did not. For example, the following code might hang:

                Mon = erlang:monitor(process, Pid),
                %% ...
                exit(Pid, bang),
                erlang:demonitor(Mon),
                receive
                {'DOWN', Mon, process, Pid, _} -> ok
                %% We were previously guaranteed to get a down message
                %% (since we exited the process ourself), so we could
                %% in this case leave out:
                %% after 0 -> ok
                end,

  Own Id: OTP-5772
- Global no longer allows the registration of a process under more than one name. If the old (buggy) behavior is desired the Kernel application variable `global_multi_name_action` can be given the value `allow`.
  Own Id: OTP-5640 Aux Id: OTP-5603
- The `auth` module API is deprecated.
  Own Id: OTP-6037
- Several bug fixes and improvements in the global name registration facility (see `global(3)`):
  - the name resolving procedure did not always unlink no longer registered processes;
  - the global name server could sometimes hang when a `nodedown` was immediately followed by a `nodeup`;
  - global names were not always unregistered when a node went down;
  - it is now possible to set and delete locks at the same time as the global name server is resolving names--the handling of global locks has been separated from registration of global names;
  As of this version, `global` no longer supports nodes running Erlang/OTP R7B or earlier.
  Introduced in Kernel 2.10.11
  Own Id: OTP-5563
- The previously undocumented and UNSUPPORTED `zlib` module has been updated in an incompatible way and many bugs have been corrected. It is now also documented.
  Introduced in Kernel 2.10.11
  Own Id: OTP-5715

## 5 Megaco

- The old version info print function, `format_versions/1`, have been deprecated.
  Introduced in Megaco 3.2.7
  Own Id: OTP-5953
- The `conn_info` function once again returns the next transaction id.
  Introduced in Megaco 3.2.5
  Own Id: OTP-5887
  Aux Id: Seq 10184
- `localControlDescriptor` list of `localParm` now at least has to be of length 1.
  Introduced in Megaco 3.2.4
  Own Id: OTP-5882
- The `ok` return value from `test_digit_event` and `eval_digit_map` has been changed.
  Introduced in Megaco 3.2.3/3.2.2
  Own Id: OTP-5826 Aux Id: Seq 10085
- The (successful) return value from the `test_digit_event` and `eval_digit_map` has been changed.
  Introduced in Megaco 3.2
  Own Id: OTP-5750 Aux Id: Seq 10085
- The `File` argument to the function `enable_trace` no longer sets up `dbg` to write the trace events directly to file but instead to be written to a plain text file using `io:format`.
  Also `enable_trace` no longer accepts the argument `{io, Verbosity}`.
  Own Id: OTP-5447
  Introduced in Megaco 3.0.1
- Package number scheme (among other things) was changed in version 1 of the standard.
  Introduced in Megaco 3.0
  Own Id: OTP-5272
- The config property orig_pending_limit has been renamed to sent_pending_limit.
  Introduced in Megaco 3.0
  Own Id: OTP-5220

## 6 OS_Mon

- The behaviour of OS_Mon 2.0 is backwards compatible under normal operation, but has changed somewhat in error situations: The services do not terminate and the API functions do not raise exceptions in all cases where they did before. Also, in the case where a service does terminate, the exit reason may be different.
- The memsup part of the OS_Mon application has been made more stable. If there are (possibly temporary) problems collecting memory data, the interface functions (`get_memory_data/0`, `get_system_memory_data/0`) now do not fail, but return the previously collected value, if any, or a dummy value otherwise. Also, a warning message is printed.
  Introduced in OS_Mon 1.8
  Own Id: OTP-5798

## 7 SASL

- A new option `{update_paths,Bool}` has been added for `release_handler:install_release/2`. It indicates if all application code paths should be updated (`Bool==true`), or if only code paths for modified applications should be updated (`Bool==false`, default).
  `release_handler:set_unpacked/2` now returns an error tuple if a specified application directory does not exist.
  Introduced in SASL 2.1
  Own Id: OTP-5761

## 8 SNMP

- [manager] The `snmpm_network_interface` behaviour has been updated (see `inform_response` and definition of the manager net if).
  Introduced in SNMP 4.5
  Own Id: OTP-5733
- [agent] The format of the info returned by the agent info retrieval function has been changed. The info can be converted to the old format by calling the `old_info_format` function.
  Introduced in SNMP 4.4
  Own Id: OTP-5666

## 9 SSL

- The state of a connection in active mode could be in a restrictive state, so that an internal `tcp_closed` message was incorrectly considered illegal, resulting in a premature termination of the connection process.
  Introduced in SSL 3.0.11
  Own Id: OTP-5972 Aux Id: seq10188

## 10 STDLIB

- `ets:info/1` has been corrected to behave according to the documentation and return a list of tuples, not a tuple with tuples.
  Own Id: OTP-5639
- Corrected `filelib:ensure_dir/1` which sometimes returned `true` and sometimes `ok` to always return `ok` when successful. This goes against the documentation which said `true`, but `ok` was judged to be a more logical return value.
  Own Id: OTP-5960 Aux Id: seq10240
- The functions `lists:ukeysort/2` and `lists:ukeymerge/3` have been changed in such a way that two tuples are considered equal if their keys match.
  For the sake of consistency, `lists:usort/2` and `lists:umerge/3` have been modified too: two elements are considered equal if they compare equal.
  The `file_sorter` module has been modified in a similar way: the `unique` option now applies to the key (`keysort()` and `keymerge()`) and the ordering function (the option `{order, Order}` ).
  Own Id: OTP-6019
- The `public` option has been removed from `digraph:new/1`. The reason is that several functions in the `digraph` module are implemented using multiple ETS accesses, which is not thread safe. (Thanks to Ulf Wiger.)
  Own Id: OTP-5985
- Referencing a so far undeclared record from the default value of some record declaration is from now on considered an error by the linter. It is also an error if the default value of a record declaration uses or binds a variable.
  Own Id: OTP-5878
- `filelib:wildcard/2` was broken (it ignored its second argument).
  Also, `filelib:wildcard("Filename")` (where the argument does not contain any meta-characters) would always return `["Filename"]`. Corrected so that an empty list will be returned if `"Filename"` does not actually exist. (Same correction in `filelib:wildcard/2`.) (This change is a slight incompatibility.)
  `filelib:wildcard/1,2` will generate a different exception when given bad patterns such as `"{a,"`. The exception used to be caused by `exit(missing_delimiter)` but is now `erlang:error({badpattern,missing_delimiter})`.
  Introduced in STDLIB 1.13.7
  Own Id: OTP-5523 Aux Id: seq9824
- `gb_sets:del_element/2` was changed to do the same as `gb_sets:delete_any/2` which was the original intention, not as `gb_sets:delete/2`. Code that relies on `gb_sets:del_element/2` causing an error if the element does not exist must be changed to call `gb_sets:delete/2` instead.
  The documentation was also updated to explicitly document functions that were only referred to as "aliases" of a documented function. Also, a list of all functions common to the `gb_sets`, `sets`, and `ordsets` was added.
  Introduced in STDLIB 1.13.3
  Own Id: OTP-5277

Copyright © 1991-2006 Ericsson AB