Skip to content

Segfaulting when starting VSCode #45

Open

Description

Issue Summary

VSCode SEGFAULTs in @vscode/sqlite3/build/Release/vscode-sqlite3.node.

#0  0x0000000001010101 in ??? ()
#1  0x0000771164cc2dc7 in sqlite3VdbeExec (p=p@entry=0x381c046e4ca0)
    at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:98848
#2  0x0000771164ccad24 in sqlite3Step (p=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91222
#3  sqlite3_step (pStmt=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91283
#4  sqlite3_step (pStmt=<optimized out>) at /usr/src/debug/sqlite/sqlite-src-3460000/sqlite3.c:91272
#5  0x00007711615edec6 in node_sqlite3::Statement::Work_Run(napi_env__*, void*) ()
    at /opt/visual-studio-code/resources/app/node_modules.asar.unpacked/@vscode/sqlite3/build/Release/vscode-sqlite3.node
#6  0x00005ca2a84acb20 in ??? ()
#7  0x0000000000000075 in ??? ()
#8  0x0000000000000000 in ??? ()

Steps to Reproduce

  1. Start VSCode
  2. It closes

Version

not sure

Node.js Version

not sure

How did you install the library?

VSCode 1.90.2-1 on Arch Linux (using the AUR visual-studio-code-bin package)

Activity

  1. TheDevMinerTV commented on Jul 1, 2024

    @TheDevMinerTV
    Author

    Looking at the sqlite3.c path, I downloaded the sqlite3.c version from their website.
    Surrounding code:

      /* Invoke the update-hook if required. */
      if( rc ) goto abort_due_to_error;
      if( pTab ){
        assert( db->xUpdateCallback!=0 );
        assert( pTab->aCol!=0 );
        db->xUpdateCallback(db->pUpdateArg,
               (pOp->p5 & OPFLAG_ISUPDATE) ? SQLITE_UPDATE : SQLITE_INSERT,
               zDb, pTab->zName, x.nKey);                                   // :98848
      }
      break;

    After checking with gdb, I see that db->pUpdateArg is never set and sqlite3_update_hook is never getting called which would've set that.

    Looking at this module's code, sqlite3_update_hook is only used in Database::RegisterUpdateCallback(Baton*), which is only used in Database::Configure().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions