Skip to content

Switch object magic validation to hash table lookup #9869

@slouken

Description

@slouken

Right now if you pass an invalid object to an SDL API, we check a magic pointer to verify that it's still valid, and we clear that pointer when we destroy the object. This is helpful, but not 100% foolproof if the object points to invalid memory. We can change the magic pointer validation to look up the pointer in a valid object hashtable so we don't crash in those cases.

We might also want an option to strip these checks out for performance and/or abort the program if they occur.

Fixes #9235

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions