Skip to content

Unchecked access of disablePageSizeChange #146

Closed

Description

@DallasHoff

Tried updating from 3.50.4-build1 to 3.51.2-build5 today. When attempting to use the KVVFS, SQLite WASM throws xFileControl [TypeError: Cannot read properties of undefined (reading 'disablePageSizeChange')]. If I edit the library's use of kvvfs.internal.disablePageSizeChange to kvvfs.internal?.disablePageSizeChange, all my tests pass, so the logic that reads disablePageSizeChange needs to be patched somehow, if not simply like this.

Activity

  1. jurerotar commented on Jan 29, 2026

    @jurerotar
    Contributor

    I can't help with this one, because it seems to be coming from upstream. :(

    What I can do though, is create a test suite to make sure we catch this in the future. Since I don't use KVVFS API, could you check please #147, and if possible, add more test cases for features that I missed and you're more familiar with 😄

  2. sgbeal commented on Jan 30, 2026

    @sgbeal
    Collaborator

    Thank you for the report - i'll get that resolved today. You shouldn't need the patch you applied, but it is also harmless for the time being.

  3. sgbeal commented on Jan 30, 2026

    @sgbeal
    Collaborator

    Fixed in https://sqlite.org/src/info/407724c4e8:

    -              && kvvfs.internal.disablePageSizeChange ){
    +              && kvvfsInternal.disablePageSizeChange ){
    

    The symbol kvvfs.internal is only set when running kvvfs knows that it's running in a test build. kvvfsInternal, on the other hand, is scoped to that file regardless of test/non-test mode.

  4. tomayac commented on Jan 30, 2026

    @tomayac
    Collaborator

    Closing as fixed upstream. Thanks all!

  5. DallasHoff commented on Jan 31, 2026

    @DallasHoff
    ContributorAuthor

    Yes, thank you all :)

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions