Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

portability issue: locale misuse on OpenBSD #568

Open
marcespie opened this issue May 22, 2020 · 3 comments
Open

portability issue: locale misuse on OpenBSD #568

marcespie opened this issue May 22, 2020 · 3 comments

Comments

@marcespie
Copy link

setlocale is never thread-safe. Even with the proper mutex locking, it still leads to memory corruption here.

Right now, OpenBSD doesn't have LC_NUMERIC support, so neutering the support will allow it to run.

src4.txt

Eventually, we might get support for strtod_l and friends.

or you could switch to uselocale() for everything but windows...

@sandsmark
Copy link
Contributor

sandsmark commented Dec 15, 2020

with bumping minimum requirement to c++17 it could be replaced with std::from_chars(), that defines the behavior of strtod with a C locale.

@ddennedy
Copy link
Member

with bumping minimum requirement to c++17 it could be replaced with std::from_chars(

He is referring to the framework code, which is strictly C. We are moving away from supporting numeric locale with MLT v7 by adding a build option. I am not yet decided, which will be default.

@sandsmark
Copy link
Contributor

He is referring to the framework code, which is strictly C.

oki. I started porting it yesterday, but didn't get very far because there's a lot of stuff in mlt_property.c that isn't valid in c++, but I guess I can drop that. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants