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

libgenders: thread safety #47

Open
chu11 opened this issue May 21, 2020 · 0 comments
Open

libgenders: thread safety #47

chu11 opened this issue May 21, 2020 · 0 comments

Comments

@chu11
Copy link
Member

chu11 commented May 21, 2020

Several internal data structures in libcommon (list.c, hash.c minimally) are not compiled with the WITH_PTHREADS macro, thus are not thread safe. If some genders functions are called by multiple threads, badness can occur.

For example, genders_isattrval() is one example which creates list iterators. If multiple threads were to call genders_isattrval() on the same attr, multiple iterators could be created on the same list, leading to possible collisions in the internals of list.c.

If it is desired to make libgenders thread safe, code will probably need to be auditted to see what else may not be thread safe.

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