Skip to content

Revert commit 61db6fcf to fix shutdown crash on macOS#68

Open
nickeyme wants to merge 1 commit intomicrosoft:release/vscodefrom
nickeyme:fix/shutdown-crash
Open

Revert commit 61db6fcf to fix shutdown crash on macOS#68
nickeyme wants to merge 1 commit intomicrosoft:release/vscodefrom
nickeyme:fix/shutdown-crash

Conversation

@nickeyme
Copy link
Copy Markdown

@nickeyme nickeyme commented Feb 5, 2026

fix issue (#67)

@nickeyme
Copy link
Copy Markdown
Author

nickeyme commented Feb 5, 2026

@microsoft-github-policy-service agree

@rzhao271 rzhao271 requested a review from deepak1556 February 19, 2026 16:43
Copy link
Copy Markdown

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the minimal test case in the issue, as for the change can you adjust TRY_CATCH_CALL to capture the exception in the shutdown case. It seems incorrect to mix NAPI_DISABLE_CPP_EXCEPTIONS=1 when c++ exception handling is enabled.

@gms1
Copy link
Copy Markdown

gms1 commented Apr 4, 2026

Unfortunately, I was not able to reproduce this crash with Node, so as a form of defensive programming, I fixed this here, by silently ignoring exceptions during shutdown:
gms1#6

@gms1
Copy link
Copy Markdown

gms1 commented Apr 25, 2026

Originally, I wanted to keep my fork somewhat similar with this one, and therefore I also enabled the C++ exceptions.
Then, while improving test coverage, I realized that this could lead to uncatchable exceptions.
Therefore, I recommend simply using the default settings, without any C++ exceptions settings, which results in them being disabled
https://github.com/gms1/node-sqlite3/blob/main/binding.gyp

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.

3 participants