mongodb/js-bson — pull request #34 by richtera (2013-02-23 17:00:38+00:00)
Title: Added failed recursion test

I added the test to look for recursive objects, however it's causing a seg fault soon after. I can try to actually fix the problem but it might end up being obvious to you why it's seg faulting. To repeat my thoughts about how to fix this:
Keep a hash of all objects being looked at during the recurse and throw an exception if you see the same object again.

Change this:
```c++
template void BSONSerializer::SerializeValue(void* typeLocation, const Handle& value)
```

to something like this. I have not looked that close at the code but it should work in theory to keep a hash of identity hash values for all the objects serialized within a single serialize document or calculate size method call.
```c++
template void BSONSerializer::SerializeValue(void* typeLocation, const Handle& value, Handle