Specification of beam_lib:cmp/2 return type

Paul Guyot <>
Thu Jun 17 14:28:36 CEST 2010


R14A's beam_lib(3) man page and beam_lib:cmp_rsn() type do not completely cover the actual return type of beam_lib:cmp/2.

Indeed, beam_lib:cmp/2 can return {error, beam_lib, different_chunks} if there is a non-useless chunk (i.e. a chunk other than "CInf") in Beam1 that is not in Beam2, or reciprocally -- (cf beam_lib.erl, line 352).

A patch for this specification is available here:

git fetch git://github.com/pguyot/otp.git pg/beam_lib_cmp_2_return_type_specification



More information about the erlang-patches mailing list