[erlang-questions] size_object: bad tag for 0x600

Mikael Pettersson <>
Mon Jun 7 00:02:17 CEST 2010


Saurabh Narula writes:
 > Hello everyone,
 > 
 > I am getting this error when i try to pattern match the result of C
 > language NIF function with the erlang term.
 > 
 > Even though the Eterm returned from the C Language NIF and erlang Term
 > are same in format, the pattern match operation fails with the error
 > "size_object: bad tag for 0x600".
 > 
 > Overview of what i am doing -
 > 
 > 1. send string with binary format from erlang to NIF.
 > 2. inside NIF do operations.
 > 3. parse string character by character inside NiF, make head | tail List/String
 > 4. make eterms with these string with some atom etc.
 > 5. pass it back to erlang.
 > 6. do a pattern match of the string in erlang and string/list received
 > from C NIF.
 > 
 > 
 > Thank you in advance for your help.

size_object() operates on Erlang terms, but 0x600 is not a valid
representation for any Erlang term, that's why it complains.

Somewhere in your code where you construct Erlang terms you do
so incorrectly. Perhaps you're inserting a C integer into a term
somewhere and forgot to call make_small()?


More information about the erlang-questions mailing list