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

Open
#76 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp
Domain
cli

Research direction

Start with the linked Stack Overflow minimal working example and reproduce the regression from 1.69.0 using Clang UBSan with the stated visibility flags. Determine whether the report reflects actual undefined behaviour or a UBSan false positive; completion requires a confirmed diagnosis and a documented fix or upstream resolution.

Written by the indexing model from the issue text.

Description

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 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.

Dominant language
C++
Stars
136
Forks
117
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/program_options

All issues in boostorg/program_options

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.