Skip to content

Safe threads only - #918

Merged
HalFrgrd merged 19 commits into
masterfrom
safe_threads_only
Aug 14, 2026
Merged

HalFrgrd merged 19 commits into
masterfrom
safe_threads_only

Conversation

@HalFrgrd

Copy link
Copy Markdown
Owner
  • Starting and stopping threads calls glibc which calls bash's non threadsafe allocator. So we can't start and stop threads freely.
  • libc stuff like opendir will allocate a struct using bash's non thread safe allocator. So it is hard to interact with the file system in a threadsafe way.

I can detect this with hardened_bash https://github.com/HalFrgrd/mirror-bash/tree/master.

My solution is to fork the process (like Im already doing for autosuggestions) when we really need parallelism.

Hopefully will close: #891 and #915

@HalFrgrd
HalFrgrd merged commit 355684c into master Aug 14, 2026
@HalFrgrd
HalFrgrd deleted the safe_threads_only branch August 14, 2026 21:17
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.

[BUG]: v1.5.0: crash in background thread accessing bash internals (get_cached_shell_functions)

1 participant