Skip to content

[darwin] Fix thread-list buffer sizing - #394

Merged
jiegec merged 2 commits into
lsof-org:masterfrom
hugojosealmeida:fix/darwin-thread-buffer-size
Nov 16, 2026
Merged

jiegec merged 2 commits into
lsof-org:masterfrom
hugojosealmeida:fix/darwin-thread-buffer-size

Conversation

@hugojosealmeida

Copy link
Copy Markdown
Contributor

Convert the thread count to bytes before sizing the thread-list buffer. The undersized buffer silently omitted thread-specific working directories in heavily threaded processes.

Verified on macOS: all 100 directories are now reported, versus 31 before.

hugojosealmeida and others added 2 commits November 15, 2026 18:26
Track the thread buffer capacity in entries (NThreads) instead of bytes, and grow it with grow_array(). This fixes the thread-count vs byte-size mismatch that truncated heavily threaded processes.
@jiegec
jiegec merged commit d4375d4 into lsof-org:master Nov 16, 2026
17 checks passed
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.

2 participants