anchor.diff:  	 mem_leak/1, coerce_to_float/1, bjorn/1, append_empty_is_same/1,
   	 huge_float_field/1, system_limit/1, badarg/1,
   	 copy_writable_binary/1, kostis/1, dynamic/1, bs_add/1,
  -	 otp_7422/1, zero_width/1, bad_append/1, bs_add_overflow/1]).
  +	 otp_7422/1, zero_width/1, bad_append/1, bs_append_overflow/1]).
   
   -include_lib("common_test/include/ct.hrl").
   
  
positive.code: append_unit_16(Bin) ->
      <<Bin/binary-unit:16,0:1>>.
  
  %% Produce a large result of bs_add that, if cast to signed int, would overflow
  %% into a negative number that fits a smallnum.
  bs_add_overflow(_Config) ->
      Memsize = memsize(),
      io:format("Memsize = ~w Bytes~n", [Memsize]),
      case erlang:system_info(wordsize) of
  	8 ->
  	    {skip, "64-bit architecture"};
          _ when Memsize < (2 bsl 30) ->
  	    {skip, "Less then 2 GB of memory"};
  	4 ->
              {'EXIT', {system_limit, _}} = (catch bs_add_overflow_signed()),
              {'EXIT', {system_limit, _}} = (catch bs_add_overflow_unsigned()),
  	    ok
      end.
  
  bs_add_overflow_signed() ->
      %% Produce a large result of bs_add that, if cast to signed int, would
      %% overflow into a negative number that fits a smallnum.
      Large = <<0:((1 bsl 30)-1)>>,
      <<Large/bits, Large/bits, Large/bits, Large/bits,
        Large/bits, Large/bits, Large/bits, Large/bits,
        Large/bits>>.
  
  bs_add_overflow_unsigned() ->
      %% Produce a large result of bs_add that goes beyond the limit of an
      %% unsigned word. This used to succeed but produced an incorrect result
      %% where B =:= C!
      A = <<0:((1 bsl 32)-8)>>,
      B = <<2, 3>>,
  
negative.code:      in_guard, mem_leak, coerce_to_float, bjorn, append_empty_is_same,
       huge_float_field, system_limit, badarg,
       copy_writable_binary, kostis, dynamic, bs_add, otp_7422, zero_width,
       bad_append, bs_append_overflow].
  
  init_per_suite(Config) ->
      Config.
  