Skip to content

Fix some Factory/ext_type optimization edge cases - #400

Open
hmcguire-shopify wants to merge 1 commit into
msgpack:masterfrom
Shopify:hm-nvplsywlxruxzzmx
Open

Fix some Factory/ext_type optimization edge cases#400
hmcguire-shopify wants to merge 1 commit into
msgpack:masterfrom
Shopify:hm-nvplsywlxruxzzmx

Conversation

@hmcguire-shopify

Copy link
Copy Markdown

Previously, optimized_symbol_parsing would enable a fast path for symbols but it never actually registered the Symbol's ext_type (so it was always 0x0). This resulted in the optimization not working if Symbol is registered with a different type and could additionally cause data corruption if some other type is registered as 0x0.

Additionally, many of these Factory fields were not copied over on dup, meaning pooled Factories would have optimized_symbol_parsing disabled if they don't explicitly freeze before calling pool (which would do dup.freeze).

Previously, optimized_symbol_parsing would enable a fast path for
symbols but it never actually registered the Symbol's ext_type (so it
was always 0x0). This resulted in the optimization not working if Symbol
is registered with a different type and could additionally cause data
corruption if some other type is registered as 0x0.

Additionally, many of these Factory fields were not copied over on dup,
meaning pooled Factories would have optimized_symbol_parsing disabled if
they don't explicitly `freeze` before calling `pool` (which would do
`dup.freeze`).
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.

2 participants