Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: msgpack/msgpack-ruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.7.3
Choose a base ref
...
head repository: msgpack/msgpack-ruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.7.5
Choose a head ref
  • 13 commits
  • 9 files changed
  • 1 contributor

Commits on Nov 8, 2024

  1. Prevent memory leak when a recursive unpacker raises an exception

    The child stack wouldn't be popped nor freed.
    
    Additionally, even once the packer was freed, only the latest stack
    would be freed, all the parent stack would be leaked.
    
    Practically speaking, every time a recursive unpacker would raise,
    4kiB would be leaked.
    byroot committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    8a79706 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #371 from Shopify/recursive-raise-leak

    Prevent memory leak when a recursive unpacker raises an exception
    byroot authored Nov 8, 2024
    Configuration menu
    Copy the full SHA
    9bac145 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2024

  1. Refactor unpacking of recursive types

    Extracted from: #370
    
    As initially implemented, we allocate a new stack whenever we
    encounter a child stack. This means acquiring a whole 4kiB chunk
    from the arena, which generally is overkill.
    
    Instead we can introduce a new type of stack item, that behave just
    like a Hash or Array.
    byroot committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    8289177 View commit details
    Browse the repository at this point in the history
  2. Embed unpacker_stack inside unpacker

    Now that there's no longer a concept of child stacks, we can
    embed the struct and save a malloc/free pair.
    byroot committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    3d28793 View commit details
    Browse the repository at this point in the history
  3. Reorder msgpack_unpacker_t

    Reduce its size from 264 to 256B.
    byroot committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    3778272 View commit details
    Browse the repository at this point in the history
  4. Reorder msgpack_packer struct

    Reduce its size from 224 to 216B.
    byroot committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    b9fd86f View commit details
    Browse the repository at this point in the history
  5. Remove cast_block from msgpack_buffer

    It's only used by the unpacking loop, and can perfectly be allocated
    on the stack, no reason to add an extra 8B in every buffer struct for
    it.
    byroot committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    809ce8b View commit details
    Browse the repository at this point in the history
  6. Merge pull request #374 from msgpack/remove-cast-block

    Remove `cast_block` from `msgpack_buffer`
    byroot authored Nov 11, 2024
    Configuration menu
    Copy the full SHA
    938d75e View commit details
    Browse the repository at this point in the history
  7. Merge pull request #373 from msgpack/reoder-packer

    Reorder msgpack_packer struct
    byroot authored Nov 11, 2024
    Configuration menu
    Copy the full SHA
    b3bcc6b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    b265f3c View commit details
    Browse the repository at this point in the history
  9. Merge pull request #372 from msgpack/refactor-stack

    Refactor unpacking of recursive types
    byroot authored Nov 11, 2024
    Configuration menu
    Copy the full SHA
    a60b1da View commit details
    Browse the repository at this point in the history
  10. Release 1.7.4

    byroot committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    5c601c0 View commit details
    Browse the repository at this point in the history
  11. Release 1.7.5

    byroot committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    2a92ffb View commit details
    Browse the repository at this point in the history
Loading