boostorg / boostorg/program_options

[Regression 1.69.0] Clang UBSan triggers when std::string is used in notify()

未关闭
#76 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
136
派生
117
PR 合并指标
30 天内没有已合并 PR

描述

We found that clang UBSan shows undefined behaviour when we use an option of type std::string with po::notify(). Please see https://stackoverflow.com/q/55064334/2375725 for more details and a minimal working example.
My colleague has already bisected the issue in [this comment](https://stackoverflow.com/questions/55064334/ubsan-boostprogram-options-with-stdstring?noredirect=1#comment96884751_55064334) and it seems to be related to activating ``-fvisibility-inlines-hidden`` and ``-fvisibility=hidden``.
Unfortunately we have no idea where to go from here...

We will also open a ticket at clang as we are really not sure whether this is a false positive in clang UBSan or actual undefined behaviour.

贡献指南

这个仓库没有索引到贡献指南

调研方向

从链接的 Stack Overflow 最小可工作示例开始,使用所述的 visibility flags 通过 Clang UBSan 重现 1.69.0 中的回归。确定该报告反映的是实际的未定义行为,还是 UBSan 的误报;完成此工作需要确认的诊断,以及有文档记录的修复或上游解决方案。

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

评估

技术栈
cpp
领域
cli
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

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