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

setUnicodeLocale is dangerous and might lead to segmentation faults #96

Open
arybczak opened this issue Jan 24, 2017 · 0 comments
Open

Comments

@arybczak
Copy link

The underlying problem is that setenv is not thread safe as simultaneous call to getenv in multithreaded enviroment might lead to segmentation fault by attempting to dereference a null pointer (relevant glibc ticket).

Considering that snap is usually started in a separate thread, this creates a serious issue, because a wide variety of functions call getenv internally (see above ticket for more info).

I personally encountered this problem when using ekg (which uses snap internally).

To be fair, I'm not sure why locale is set there to begin with.

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

1 participant