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

Thread safety issues #17

Open
dmitrysobinov opened this issue Oct 19, 2015 · 1 comment
Open

Thread safety issues #17

dmitrysobinov opened this issue Oct 19, 2015 · 1 comment

Comments

@dmitrysobinov
Copy link

There are global variables in jerasure.c which are accessed without any help of atomic instructions or mutexes:

static double jerasure_total_xor_bytes = 0;
static double jerasure_total_gf_bytes = 0;
static double jerasure_total_memcpy_bytes = 0;

So if someone calls e.g. jerasure_matrix_dotprod() from two different threads in the same time, it's undefined behavior.

Maybe it makes sense to make stats collecting optional by wrapping it in #ifdef-endif?

@tsuraan
Copy link
Owner

tsuraan commented Oct 27, 2015

I'll have a look at this, but most of the actual jerasure development is going on at jerasure.org; this repo is just a mirror of that. You might get more responses if you open your bug over there.

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

2 participants