Skip to content

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

Merged
byroot merged 1 commit into
msgpack:masterfrom
Shopify:infinite-symbol-recusrsion
Apr 19, 2023
Merged

Fix an infinite recursion issue when registering a Symbol type with a nil packer#332
byroot merged 1 commit into
msgpack:masterfrom
Shopify:infinite-symbol-recusrsion

Conversation

@casperisfine

Copy link
Copy Markdown

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

peterzhu2118
peterzhu2118 previously approved these changes Apr 18, 2023
soyed
soyed previously approved these changes Apr 18, 2023
@casperisfine

Copy link
Copy Markdown
Author

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

… `nil` packer

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.
@casperisfine
casperisfine dismissed stale reviews from soyed and peterzhu2118 via d7e4783 April 19, 2023 08:55
@casperisfine
casperisfine force-pushed the infinite-symbol-recusrsion branch from db41367 to d7e4783 Compare April 19, 2023 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants