Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
potential races in sonet #1
Dear developers of sonnet project,
I'm a Ph.D. student and I'm doing a research on checking data races for Android apps. I found a potential race in sonet/core/src/com/piusvelte/sonet/core/OAuthLogin.java:
at line 25, "mSonetOAuth.getAuthUrl()" is invoked in an AsyncTask;
If these two lines of code can be executed in parallel, there will be a data race on "mOAuthProvider" field of "SonetOAuth" class:
Do you think this two AsyncTasks may happen in parallel, will this data race lead to a potential bug? Do you need synchronization?
Thank you for your interest. The first AsyncTask is run to get the url for the webview, in which the second AsyncTask is run when the callback url is loaded. Because of this dependency, the second cannot run until the first completes. Does this answer your question?