Erlang problems with big binaries
Nico Kruber <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <[email protected]> |
I'd like to 'bor' (binary or) a big binary but the result is an empty list(?!) Smaller binaries work as expected. Steps to reproduce (at least on Erlang 17.4): A=erlang:term_to_binary(lists:seq(1000000,2200000)). B=erlang:term_to_binary(lists:seq(1000001,2200001)). ASize=erlang:bit_size(A). BSize=erlang:bit_size(B). <<ANr:ASize>> = A. <<BNr:BSize>> = B. XNr = ANr bor BNr. <<XNr:BSize>>. Please note that printing the actual values of A or B is not a good idea ;) and so would XNr but including it directly into a binary fails with the same error: "** exception error: bad argument" <<(ANr bor BNr):BSize>>. Regards Nico Kruber _______________________________________________ erlang-bugs mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-bugs
signature.asc
(application/pgp-signature, 181 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlS/tXgACgkQIPJyS9rqnllHsgCfS/853VZP5g+0lBpha2UGA75u aIQAn1Ac3AmCmmdM6r67+ZJS5kK5k8tO =g3Ml -----END PGP SIGNATURE-----