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

Tuncer Ayaz <>
Sun Jun 6 23:33:17 CEST 2010

On Sun, Jun 6, 2010 at 11:01 PM, Saurabh Narula wrote:
> 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".

The term you create seems to be of invalid type (tag) as size_object()
bails out with that error. This might happen if the term is tagged as
a binary but contains invalid data not matching the type.

> 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.

Can you share the code on- or off-list?

More information about the erlang-questions mailing list