You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Throwing in sqlite filter function crashes process #56890
@louwers ... the key issue, if it's not obvious, is that the filter callback function is using ToLocalChecked() within the filter callback. If the callback throws, then the returned value from the callback will be empty causing ToLocalChecked to trigger the abort. Instead the thrown error should be allowed to propagate. However, because of the way the xFilter callback is set up it's not immediately obvious what should change. We essentially need a way of allowing that API to return an error code that means "Hey, v8 scheduled an error, throw it instead"
Activity
jasnell commentedon Feb 3, 2025
/cc @cjihrig
jasnell commentedon Feb 3, 2025
Fixing the issue will necessitate refactoring the
xFilterstatic function used in theDatabaseSync::ApplyChangesetmethod in node_sqlitecjihrig commentedon Feb 3, 2025
I'll take a look, but cc @louwers who worked on the session extension.
louwers commentedon Feb 3, 2025
I can take a look.
jasnell commentedon Feb 3, 2025
@louwers ... the key issue, if it's not obvious, is that the filter callback function is using
ToLocalChecked()within the filter callback. If the callback throws, then the returned value from the callback will be empty causingToLocalCheckedto trigger the abort. Instead the thrown error should be allowed to propagate. However, because of the way thexFiltercallback is set up it's not immediately obvious what should change. We essentially need a way of allowing that API to return an error code that means "Hey, v8 scheduled an error, throw it instead"cjihrig commentedon Feb 3, 2025
Something like #56787 might work if it can ever get merged.
louwers commentedon Feb 3, 2025
I created a PR: #56903
geeksilva97 commentedon Sep 30, 2025
This issue ended up being fixed by #60028