boostorg / boostorg/program_options

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

Offen
#76 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
136
Forks
117
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
cli
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.