-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
tsan data race on iso-stress bot between TypeArguments::IsSubvectorEquivalent and TypeArguments::Canonicalize #47140
Comments
Happened once again:
|
Looking at the code, the race seems to be bool TypeArguments::IsSubvectorEquivalent(...) {
...
for (intptr_t i = from_index; i < from_index + len; i++) {
type = IsNull() ? Type::DynamicType() : TypeAt(i); // <-- reads type at i
...
}
...
} races with TypeArgumentsPtr TypeArguments::Canonicalize(...) {
...
{
SafepointMutexLocker ml(isolate_group->type_canonicalization_mutex());
...
result ^= table.GetOrNull(CanonicalTypeArgumentsKey(*this));
}
if (result.IsNull()) {
// Canonicalize each type argument.
AbstractType& type_arg = AbstractType::Handle(zone);
for (intptr_t i = 0; i < num_types; i++) {
type_arg = TypeAt(i);
type_arg = type_arg.Canonicalize(thread, trail);
SetTypeAt(i, type_arg); // <-- writes type i
}
...
SafepointMutexLocker ml(isolate_group->type_canonicalization_mutex());
...
} Maybe we could split this into a /cc @aam Interested in looking at this? |
Immediate complication seems to be that there is indirect recursion: |
Perhaps we should aggregate all canonicalized types in |
from logs
The text was updated successfully, but these errors were encountered: