Skip to content

Fix uninitialized mutexes in pthread_once cancellation test - #5

Merged
fjtrujy merged 2 commits into
platform_agnosticfrom
fix/once4-mutex-lifecycle
Nov 26, 2026
Merged

fjtrujy merged 2 commits into
platform_agnosticfrom
fix/once4-mutex-lifecycle

Conversation

@fjtrujy

@fjtrujy fjtrujy commented Nov 26, 2026

Copy link
Copy Markdown
Member

The portable Once #4 test used two OSAL mutexes whose creation/destruction was commented out. Initialize both before starting workers and destroy them after joining all workers; assert successful OSAL operations. This is the same test-only change as ps2dev#3. The isolated test passed in PCSX2 and PPSSPP, and the full PS2 suite now advances past Once #4.

The cancellation test locks two shared OSAL mutexes but their creation and destruction were commented out. Allocate both before creating workers and release them after all workers have joined, checking each result.
Delete each tsd1 key after checking the caller value, rather than leaving duplicate destructors pointing at shared counters across test iterations. Exercise key deletion and recreation while two workers remain alive. Verify implicit thread destruction exactly once on repeated runtime termination.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant