Skip to content

getOwnPropertyNames memory corruption#262

Open
amoffat wants to merge 2 commits into
justjake:mainfrom
amoffat:get-property-names
Open

getOwnPropertyNames memory corruption#262
amoffat wants to merge 2 commits into
justjake:mainfrom
amoffat:get-property-names

Conversation

@amoffat
Copy link
Copy Markdown

@amoffat amoffat commented May 13, 2026

getOwnPropertyNames was allocating with malloc things that would be freed by js_free, which was a mismatch. In my use case, it was eventually causing a crash. The test explains the "drifting" concept leading to that.

The allocator.test.ts is general enough to be used like the leak.test.ts tests, where you can throw things in there and ensure that they aren't also having mismatched allocations.

Awesome library btw

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.

1 participant