msgpack / msgpack-ruby

MessagePack implementation for Ruby / msgpack.org[Ruby]
http://msgpack.org/
Apache License 2.0
758 stars 117 forks source link

Fix an infinite recursion issue when registering a Symbol type with a `nil` packer #332

Closed casperisfine closed 1 year ago

casperisfine commented 1 year ago

That would cause has_symbol_ext_type = true to be set, so msgpack_packer_write_symbol_value would invoke Symbol#to_msgpack which itself would call back to write_symbol causing infinite recursion.

cc @peterzhu2118 @soyed

casperisfine commented 1 year ago

Urk, of course the Java side need fixing too. I'll deal with it tomorrow.