Skip to content

Register address so that DefaultFactory doesn't get GC'd#134

Closed
tenderlove wants to merge 1 commit intomsgpack:masterfrom
tenderlove:register-address
Closed

Register address so that DefaultFactory doesn't get GC'd#134
tenderlove wants to merge 1 commit intomsgpack:masterfrom
tenderlove:register-address

Conversation

@tenderlove
Copy link
Contributor

This program will SEGV without registering the global:

$ ruby -Ilib -rmsgpack -e'MessagePack::DefaultFactory = nil; GC.start; "".to_msgpack'

This fixes #133 by registering the address so that the object does not get GC'd

This program will SEGV without registering the global:

```
$ ruby -Ilib -rmsgpack -e'MessagePack::DefaultFactory = nil; GC.start; "".to_msgpack'
```
tenderlove added a commit to github/ruby that referenced this pull request Mar 10, 2017
This is a work around for a bug in msgpack.  It should be fixed by:

 * msgpack/msgpack-ruby#134
 * msgpack/msgpack-ruby#135
@tagomoris
Copy link
Member

I've merged #135 instead of this change.

@tagomoris tagomoris closed this Jun 13, 2017
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.

Setting DefaultFactory to nil will cause a segv

2 participants