boostorg / boostorg/program_options

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

Aperta
#76 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
136
Fork
117
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.