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

Fix parallel access to global symbol structures #120

Open
dra27 opened this issue Jun 8, 2023 · 0 comments
Open

Fix parallel access to global symbol structures #120

dra27 opened this issue Jun 8, 2023 · 0 comments

Comments

@dra27
Copy link
Member

dra27 commented Jun 8, 2023

The list of loaded units is defined globally in flexdll.c:

static dlunit *units = NULL;

and is accessed in parallel both by flexdll_*dlopen and flexdll_dlsym without using a lock. Adding locks around flexdll_*dlopen is straightforward, but symbol lookup operates a most-recently-used queue on the global, and the performance impact either of removing that or, worse, of putting a lock around flexdll_dlsym is less clear.

In the meantime, reverting ocaml/ocaml#11607 provides an easy test-case for demonstrating the failure (the test usually fails within a few runs)

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