diff options
| author | Narayan Kamath <narayan@google.com> | 2016-06-07 18:34:57 +0100 |
|---|---|---|
| committer | Narayan Kamath <narayan@google.com> | 2016-06-08 17:37:55 +0100 |
| commit | 5769b6580a97194bb4460ece3f9772ba90f93695 (patch) | |
| tree | 9924445f2a013ede7f996611e106e36afd901966 /include/ScopedJavaUnicodeString.h | |
| parent | 26e368897043caae8d27dc3aa5985eb8a1f9447d (diff) | |
Charset: Fix broken level-1 caching.
The level-1 cache was incorrectly implemented. The check written here :
if (cache1 != null && charsetName.equals(cache1.getKey()))
return cache1.getValue();
Is incorrect because a different thread might change the value of cache1
between the null check, the call to getKey and the call to getValue.
The stress test in this change results in a 100% reproducible failure on a
nexus 6P without the included fix.
bug: 26548702
(cherry picked from commit 13a83b88fb12356b6edcb0bdf9171315d80583c0)
Change-Id: I081869f21e9451c03c89b7967c7f779c0205ab95
Diffstat (limited to 'include/ScopedJavaUnicodeString.h')
0 files changed, 0 insertions, 0 deletions
