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

Memory leak in recursive object inserts. #17

Open
SteinsGatep001 opened this issue Oct 13, 2020 · 5 comments
Open

Memory leak in recursive object inserts. #17

SteinsGatep001 opened this issue Oct 13, 2020 · 5 comments
Labels

Comments

@SteinsGatep001
Copy link

Description

When the Jsi_Realloc function of jsiUtils.c uses realloc to expand the memory of a dynamic array, if the requested size is larger than the original size, the new memory from realloc will not be initialized (cleared), causing memory leaks.

Debug Information

poc1_crash

@pcmacdon
Copy link
Owner

Could you perhaps provide a reproducable script? Thanks.

@SteinsGatep001
Copy link
Author

Could you perhaps provide a reproducable script? Thanks.

poc1_7.txt

@pcmacdon
Copy link
Owner

Ah, this is a known memory leak, the simplest reproduction of which is:

var x = {}; x.x = x;

See: https://docs.jsish.org/Start.md%23shortcomings

@pcmacdon
Copy link
Owner

I'm going to change the title and leave this open.

@pcmacdon
Copy link
Owner

This also leaks when using "var x = Object",
as per issue #83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants