Skip to content

Usage of atomic_thread_fence in shared_ptr.h can cause false-positives w/ TSAN #543

@romasandu-gaijin

Description

@romasandu-gaijin

Thread sanitizer does not work with atomic_thread_fences and unlikely ever will. Every usage of atomic_thread_fence must be guarded by an #if !TSAN or a similar construction for correctness of synchronization to be verifiable via TSAN.

This also breaks TSAN compilation with latest GCC, as it now warns about usage of fences when TSAN is enabled (and rightly so!)

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