FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix some Factory/ext_type optimization edge cases by hmcguire-shopify · Pull Request #400 · msgpack/msgpack-ruby · GitHub

Fix some Factory/ext_type optimization edge cases - #400

Merged
byroot merged 1 commit into
msgpack:masterfrom
Shopify:hm-nvplsywlxruxzzmx
Aug 6, 2026
Merged

Fix some Factory/ext_type optimization edge cases#400
byroot merged 1 commit into
msgpack:masterfrom
Shopify:hm-nvplsywlxruxzzmx

Conversation

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`).
byroot merged commit 64fca29 into msgpack:master Aug 6, 2026
19 checks passed
hmcguire-shopify deleted the hm-nvplsywlxruxzzmx branch August 6, 2026 15:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL