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

Fix segfaults #1368

Merged
merged 4 commits into from
Sep 6, 2020
Merged

Fix segfaults #1368

merged 4 commits into from
Sep 6, 2020

Conversation

mohd-akram
Copy link
Contributor

@mohd-akram mohd-akram commented Aug 5, 2020

This PR makes TRY_CATCH_CALL return on failure, and to enable proper cleanup, replaces usage of delete with smart pointers. It also fixes two sources of segmentation faults.

Fixes #1026, fixes #1323.

@mohd-akram mohd-akram mentioned this pull request Aug 6, 2020
@jjhbw
Copy link

jjhbw commented Aug 7, 2020

Seems to fix #1323

If the database was being closed, and non-exclusive work was scheduled,
it overrode the lock flag such that the state became open=false locked=false
instead of open=false locked=true. This caused queued work to not be
processed, leaking memory, which causes a segfault during napi cleanup.

Make the same changes to other methods for safe measure.
@kewde
Copy link
Collaborator

kewde commented Sep 6, 2020

Thanks again!

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