Skip to content

Undefined behavior with shift bounds #7

@JesseRMeyer

Description

@JesseRMeyer

tlsf-bsd/tlsf.c

Line 229 in 968c595

size_t t = ((size_t) 1 << (log2floor(size) - SL_SHIFT)) - 1;

With size of 24, UBSAN reports: tlsf.c:229:28: runtime error: shift exponent 4294967295 is too large for 64-bit type 'size_t' (aka 'unsigned long')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions