Skip to content

Add tests for pthread primitives inducing synchronization #2271

@RalfJung

Description

@RalfJung

Basically, something similar to #2270 for pthread mutex, rwlock, and condvar (but we can use deterministic scheduling by disabling preemption). Commenting out any of the validate_lock_release, validate_lock_release_shared, validate_lock_acquire in src/sync.rs should give a data race error in some test, and that does not currently happen, at least not for rwlock and condvar -- I assume that's because the standard library has some atomic variables on its own here that induce extra synchronization. So we probably need tests that directly talk to these APIs. (Also note that the pthread primitives are not even used on Linux any more, only on macOS.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-concurrencyArea: affects our concurrency (multi-thread) supportA-data-raceArea: data race detectorA-testsArea: affects our test suite or CIC-enhancementCategory: a PR with an enhancement or an issue tracking an accepted enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions