Skip to content

[v3] "returned TLS index was too high" due to incorrect interpretation of TlsAlloc return value #1359

Description

@NarutoUA

Branch: main3

On my machine, mimalloc initialization fails with error returned TLS index was too high (1027002)

Based on mi_win_tls_slot_alloc, TlsAlloc return value is treated as index to zero-based array, despite Microsoft Docs tells you the opposite:

The value of the TLS index should be treated as an opaque value; do not assume that it is an index into a zero-based array.

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