Skip to content

APSWBuffer_FromObject() "conniving performance hack" is unreliable #256

@dgrunwald

Description

@dgrunwald

Assertion failed: tmp==APSWBuffer_hash(res), file apsw\src\apswbuffer.c, line 200

Using APSW 3.26.0-r1 on Python 2.7.15 on Windows.
When using PYTHONHASHSEED=random, APSWBuffer_hash() no longer corresponds to Python hash algorithm, which invalidates the optimization of stealing the existing hash code.
In debug mode this triggers an assertion, not sure what kind of misbehavior could be triggered in normal builds.

Hash Randomization is enabled by default in Python 3, so that's probably also affected.

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