Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RDY] vim-patch:8.0.0535 #8574

Merged
merged 2 commits into from
Jun 24, 2018
Merged

[RDY] vim-patch:8.0.0535 #8574

merged 2 commits into from
Jun 24, 2018

Conversation

ckelsel
Copy link
Contributor

@ckelsel ckelsel commented Jun 17, 2018

vim-patch:8.0.0535: memory leak when exiting from within a user function

Problem: Memory leak when exiting from within a user function.
Solution: Clear the function call stack on exit.
vim/vim@6914c64

Problem:    Memory leak when exiting from within a user function.
Solution:   Clear the function call stack on exit.
vim/vim@6914c64
@marvim marvim added the RFC label Jun 17, 2018
@justinmk
Copy link
Member

ASAN build:

c/nvim/CMakeFiles/nvim.dir/eval.c.o   -c ../src/nvim/eval.c
../src/nvim/eval.c:20501:5: error: implicit declaration of function 'clear_tv' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    clear_tv(current_funccal->rettv);
    ^
../src/nvim/eval.c:20501:5: note: did you mean 'clearenv'?
/usr/include/stdlib.h:595:12: note: 'clearenv' declared here
extern int clearenv (void) __THROW;
           ^
../src/nvim/eval.c:20501:5: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
    c/nvim/CMakeFiles/nvim.dir/eval.c.o   -c ../src/nvim/eval.c
../src/nvim/eval.c:20501:5: error: implicit declaration of function 'clear_tv' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    clear_tv(current_funccal->rettv);
    ^
../src/nvim/eval.c:20501:5: note: did you mean 'clearenv'?
/usr/include/stdlib.h:595:12: note: 'clearenv' declared here
extern int clearenv (void) __THROW;
           ^
../src/nvim/eval.c:20501:5: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
    clear_tv(current_funccal->rettv);
    ^(current_funccal->rettv);
    ^

Instead of clear_tv use tv_clear.

This was only caught by the ASAN build because it's the only build that defines EXITFREE (which is where free_all_functions is used).

@janlazo
Copy link
Contributor

janlazo commented Jun 22, 2018

Is this ready?

@ckelsel ckelsel changed the title [RFC] vim-patch:8.0.0535 [RDY] vim-patch:8.0.0535 Jun 23, 2018
@marvim marvim added RDY and removed RFC labels Jun 23, 2018
@justinmk justinmk merged commit 83be7ce into neovim:master Jun 24, 2018
@justinmk justinmk removed the RDY label Jun 24, 2018
@justinmk
Copy link
Member

@janlazo Thanks for the ping, forgot about this while waiting for CI.

@ckelsel ckelsel deleted the vim-8.0.0535 branch June 25, 2018 00:32
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.

4 participants