Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@graywolf
Copy link

rb_protect is a function taking one function with
VALUE (*)(VALUE) signature, one VALUE argument, one
int* argument and returning one VALUE value. At the moment,
vim was using it as void(VALUE (*)(VALUE), int, int*) which
was causing a crash when trying to do rubyf ....

VALUE argument was sliced into int and then promoted back to
VALUE causing SEGV.

Fixes #2511

`rb_protect` is a function taking one function with
`VALUE (*)(VALUE)` signature, one VALUE argument, one
int* argument and returning one VALUE value. At the moment,
vim was using it as `void(VALUE (*)(VALUE), int, int*)` which
was causing a crash when trying to do `rubyf ...`.

`VALUE` argument was sliced into `int` and then promoted back to
`VALUE` causing SEGV.

Fixes #2511
@brammool brammool closed this in 37badc8 Jan 31, 2018
@graywolf graywolf deleted the fix_2511 branch March 20, 2018 11:31
adizero pushed a commit to adizero/vim that referenced this pull request May 19, 2018
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim#2147, greywolf, closes vim#2512, vim#2511)
janlazo added a commit to janlazo/neovim that referenced this pull request Nov 17, 2018
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Nov 18, 2018
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Dec 28, 2018
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Dec 28, 2018
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Dec 31, 2018
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Apr 12, 2019
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Apr 25, 2019
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request May 25, 2019
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Jun 8, 2019
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Jul 4, 2019
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Aug 23, 2019
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
janlazo added a commit to janlazo/neovim that referenced this pull request Sep 14, 2019
Problem:    Segmentation fault when Ruby throws an exception inside :rubyfile
            command.
Solution:   Use rb_protect() instead of rb_load_protect(). (ujihisa,
            closes vim/vim#2147, greywolf, closes vim/vim#2512, vim/vim#2511)
vim/vim@37badc8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants