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
Race in hb_ot_tags_from_language #3612
Comments
The race appears to be on |
I see that the intent here is to read from |
Thanks. I'll make it an atomic and use get/set_relaxed on it, which should satisfy thread-sanitizer. |
That said, that optimization was a bit misguided. I'll revert it. |
Let me measure and do one or the other. |
It's a static variable. It doesn't make any assumption on multiple threaded execution for effectiveness. |
@bungeman Can you see if the commit I just pished fixes the sanitizer issue? Thanks. |
Weird, I cannot reproduce this locally with our multithreaded test no matter how I try. |
At https://chromium-review.googlesource.com/c/chromium/src/+/3668368/3 attempting to roll HarfBuzz in Chromium to the commit to use atomic ints (before the change was reverted) to see if this alleviates the issue. If this lands it will be interesting to attempt to roll to the revert and see if it re-introduces the issue. |
The revert was on a PR just to test. |
Actually I didn't mean the revert to go to main. But I see it did. That was not intentional. I'll revert the revert. Ouch. |
I've confirmed locally using tsan that the atomic ops fix the issue. |
Thanks for updating the tests and reproducing. Can confirm that the roll of HarfBuzz into Chromium went well when rolling to the initial commit with the fix. After attempting a further roll ran into different issues. Will investigate and potentially open a different issue for that. |
While rolling HarfBuzz in Chromium at https://chromium-review.googlesource.com/c/chromium/src/+/3668368 ThreadSanitizer detected a race which appears to be around
hb_ot_tags_from_language
. Still investigating.The text was updated successfully, but these errors were encountered: