FreeBSD 15.1 and lower have a linker bug that affects process

未关闭
#386 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@luite 已经在做这个了。

开始于 2026年10月23日。

  • #387 来自 @luite —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
haskell

调研方向

Read the process code that selects between posix_spawn and fork, then check how it detects FreeBSD versions and review the linked FreeBSD linker bug. The issue proposes falling back to fork on versions older than 15.2; done means affected versions use that fallback while newer versions retain the posix_spawn path.

由索引模型根据 Issue 内容生成。

描述

Several people have reported GHC crashing after spawning a child process on FreeBSD:

The reason is that process is affected by a bug in the FreeBSD linker: https://github.com/freebsd/freebsd-src/commit/1e370f038778e16c4b31f8992dda339d429e5cb8 / https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295991 . I think that means that the fix will be in 15.2

The bug is a stack overflow in the dynamic linker which corrupts the memory of the parent process. Workaround is setting env vars to disable lazy binding/filtering: LD_BIND_NOW=1 LD_LOADFLTR=1, or patching process to make FreeBSD fall back to using fork instead of posix_spawn on FreeBSD older than 15.2

I'll open PR shortly, that disables the posix_spawn path on affected FreeBSD versions, falling back to fork

主要语言
Haskell
星标
91
派生
93
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

haskell/process 的其他 Issue

查看 haskell/process 的全部 Issue

相似的 Issue

更多 Haskell Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。