setUnicodeLocale is dangerous and might lead to segmentation faults
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- haskell
调研方向
Start by locating the setUnicodeLocale implementation and all of its call sites in the Snap server code. Review how it interacts with setenv, getenv, and threaded startup, then determine the intended locale behavior and define regression coverage for the reported segmentation-fault risk.
由索引模型根据 Issue 内容生成。
描述
The underlying problem is that setenv is not thread safe as simultaneous call to getenv in multithreaded enviroment might lead to segmentation fault by attempting to dereference a null pointer (relevant glibc ticket).
Considering that snap is usually started in a separate thread, this creates a serious issue, because a wide variety of functions call getenv internally (see above ticket for more info).
I personally encountered this problem when using ekg (which uses snap internally).
To be fair, I'm not sure why locale is set there to begin with.
- 主要语言
- Haskell
- 星标
- 197
- 派生
- 87
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
snapframework/snap-server 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 38/100
snapframework/snap-server#118 · 5 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
snapframework/snap-server#94 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 25/100
snapframework/snap-server#92 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
snapframework/snap-server#85 · 8 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
snapframework/snap-server#77 · 2 条评论 ·
查看 snapframework/snap-server 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
haskell-beam/beam#828 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
simplex-chat/simplex-chat#7755 ·
维护者通常 1 天内回复
-
bug core-libs
难度 2/5 1-3 小时 新手友好度 68/100
-
content good first issue
难度 2/5 1 小时以内 新手友好度 88/100
StudentSuite/awesome-skills-plugins-for-students#312 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 96/100
alunduil/collection-json.hs#415 ·
维护者通常 1 天内回复