# Potential Incompatibilities

> This document contains a list of all potential incompatibilities between Erlang 5.3/OTP R9C and the previous version Erlang 5.1/OTP R8B, and is an extract from the release notes for the respective applications.

## Compiler

- 'try' and 'cond' are keywords in R9 and must not be used as atom names or field names in records (unless they are single-quoted). In the R9 release, the compiler options 'disable_try' and 'disable_cond' can be used to allow 'try' and 'cond' to be used as in previous releases (to allow compilation of old Erlang code).
  The 'disable_try'/'disable_cond' options will be removed in the R10 release.
  (Own Id: OTP-4464)

- When updating a record, the record is now always checked for the correct record tag and size. Earlier versions of the compiler did not consistently add such a test (depending on the size of the record and the number of fields updated).
  (Own Id: OTP-4764)

## Erl_Interface

- In R9C the interface header files and internal header files where separated. User programs that used internal symbols and functions in "erl_interface.h" or "ei.h" may not compile in R9C without changes.
- In R9C the library archives where separated into different libraries for linking with single threaded or multi threaded code. See the manual for details. Support for the non POSIX Solaris threads where removed.
- In order to conform to the Erlang specification, comparison between two pids was changed in the R9B release. This change did however break a deadlock- prevention algorithm used by mnesia during release upgrade. Therefore, comparison between two pids has been changed back so that R9B nodes are compatible with Erlang nodes running pre-R9 releases.
  Pre-R9 comparison between two pids which now is used again: If t1 and t2 are both pids, t1 will precede t2 if and only if either * the node local id of t1 precedes the node local id of t2, or * the node local ids of t1 and t2 are equal, and node(t1) precedes node(t2), or * the node local ids of t1 and t2 are equal, and also node(t1) and node(t2) are equal, and node(t1) was created before node(t2).
  The node local id consist of two integers; serial which is most significant, and number.
  The Erlang specification states: If t1 and t2 are both refs, both PIDs, or both ports, then t1 precedes t2 if and only if either * node(t1) precedes node(t2), or * node(t1) equals node(t2) and t1 was created before t2.
  Note that comparisons between two refs, or two ports will still conform to the Erlang specification.
  (Own Id: OTP-4715)
  (Aux Id: OTP-4511, OTP-4512)

## ERTS

- spawn_opt/4 used 0 as default value for fullsweep_after instead of the default value used by spawn/3, and spawn_link/3. This caused all processes spawned by spawn_opt/4 (e.g. all gen_servers) to allways use fullsweep if the fullsweep_after option wasn't explicitly set. spawn_opt/4 has now been changed to use the same default value as spawn/3, and spawn_link/3.
  (Own Id: OTP-4179)

- The format of the monitor messages has been changed. The `Object` field in the `{'DOWN', MonitorReference, Type, Object, Info}` messages is now always on the form `{RegisteredName, NodeName}` when `erlang:monitor/2` has been called with a registered name (see erlang(3)).
  (Own Id: OTP-4311)
  (Aux Id: Seq7326)

- Comparisons between two `port`s or between two `reference`s were previously unstable and didn't conform to the Erlang specification. Comparisons between two `pid`s didn't previously conform to the Erlang specification. The comparison between two `pid`s, `port`s, or `reference`s has therefore been changed and is now stable, and does now conform to the Erlang specification.

  Cut from the Erlang specification:
  If `t1` and `t2` are both refs, both PIDs, or both ports, then `t1` precedes `t2` if and only if either
  * `node(t1)` precedes `node(t2)`, or
  * `node(t1)` equals `node(t2)` and `t1` was created before `t2`.
  (Own Id: OTP-4511)

- Support for zombies has been removed. `erlang:system_flag/2` will no longer accept the `keep_zombies` argument. `process_info/2` will no longer accept the `exit` option (which was used to retrieve the exit reason for a zombie process).
  (Own Id: OTP-4523)

- A number of new memory allocators have been introduced in order to further reduce the memory consumption of the emulator. In order to resemble the Erlang/OTP R9B system, most of these allocators are disabled by default in the Erlang/OTP R9C release. By starting the emulator with the command-line argument "`+Mea r10b`", the emulator will use the default configuration we currently expect the Erlang/OTP R10B emulator to use. See the `erts_alloc(3)` documentation for further information.
  Also new functionality for inspection of memory usage has been introduced. See the `instrument(3)`, `erlang:system_info/1`, and `erts_alloc(3)` documentation for further information.
  NOTE: Some system flags (+ command line arguments passed to erl) have been changed. The `+m`, `+t`, and `+T` flags have been changed to, respectively, `+MYm`, `+MYtt`, and `+MYtp`. The `+d`, and `+S*` flags have been removed. See the `erts_alloc(3)`, and the `erl(1)` documentation for further information.
  (Own Id: OTP-4534)
  (Aux Id: OTP-4761)

- The beam files contain information of the source filenames unless stripped.
  (Own Id: OTP-4611)
  (Aux Id: seq7627)

- In order to conform to the Erlang specification, comparison between two pids was changed in the R9B release. This change did however break a deadlock- prevention algorithm used by mnesia during release upgrade. Therefore, comparison between two pids has been changed back so that R9B nodes are compatible with Erlang nodes running pre-R9 releases.
  Pre-R9 comparison between two pids which now is used again: If t1 and t2 are both pids, t1 will precede t2 if and only if either * the node local id of t1 precedes the node local id of t2, or * the node local ids of t1 and t2 are equal, and node(t1) precedes node(t2), or * the node local ids of t1 and t2 are equal, and also node(t1) and node(t2) are equal, and node(t1) was created before node(t2).
  The node local id consist of two integers; serial which is most significant, and number.
  The Erlang specification states: If t1 and t2 are both refs, both PIDs, or both ports, then t1 precedes t2 if and only if either * node(t1) precedes node(t2), or * node(t1) equals node(t2) and t1 was created before t2.
  Note that comparisons between two refs, or two ports will still conform to the Erlang specification.
  (Own Id: OTP-4715)
  (Aux Id: OTP-4511, OTP-4512)

## Kernel

- The module 'erlang' is now preloaded. Customized start scripts have to be rebuilt.
  (Own Id: OTP-4433)

- os:find_executable/1 would return wrong return values ({ok,Name} or error) if given an absolute path name instead of the documented values (Name or false).
  (Own Id: OTP-4476)

- Support for zombies has been removed. `erlang:system_flag/2` will no longer accept the `keep_zombies` argument. `process_info/2` will no longer accept the `exit` option (which was used to retrieve the exit reason for a zombie process).
  (Own Id: OTP-4523)

- The options 'append' is no longer allowed together with 'compressed' to file:open/2 (previously ignored). And directories can no longer be opened with file:open/2 by using the 'compressed' flag.
  (Own Id: OTP-4536)

- Previously unexpected return values when calling gen_tcp:connect/3 with invalid Options values has been changed so the function exits when the option list contains invalid options, or is not a list.
  (Own Id: OTP-4567)

## ODBC

- New API that has an Erlang/OTP touch and feel instead of being a C-interface with Erlang syntax. The old interface is deprecated and will be removed in release R10.
  (Own Id: OTP-4498)

- API functions that became deprecated in version 0.9.1 has been removed.
  (Own Id: OTP-4499)

## OS_Mon

- Nodename is now used as key in loadtable (os_mon mib).
  (Own Id: OTP-4501)
  (Aux Id: seq7435, seq7549, seq7596)

## Runtime_Tools

- A tracer is no longer autmatically started on the local node. I.e. to start a tracer on the local node you must explicitly call `dbg:tracer/0` or `dbg:tracer/2`.
- `dbg:ln/0` now includes the local node if it is traced
- Return values from `dbg:p/2` and `dbg:tp/x` are changed - the element `{matched,N}` is replaced by `{matched,LocalNode,N}`

(Own Id: OTP-4346)

## STDLIB

- The undocumented and deprecated module bplus_tree in stdlib has been removed.
  (Own Id: OTP-4468)

- The deprecated module 'unix' has been removed. (Used 'os' instead.)
  (Own Id: OTP-4470)

## Tools

- The module interface for the `instrument` module has been slightely changed. Also some new functionallity has been added. See the `instrument(3)` man page for more information.
  (Own Id: OTP-4761)
  (Aux Id: OTP-4534)