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

Fix loading of AMDGPU and CUDA #47334

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 33 additions & 30 deletions src/dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -2413,17 +2413,18 @@ static jl_array_t *jl_verify_edges(jl_array_t *targets)
jl_methtable_t *mt = jl_method_get_table(((jl_method_instance_t*)callee)->def.method);
if ((jl_value_t*)mt == jl_nothing) {
valid = 0;
break;
}
matches = jl_gf_invoke_lookup_worlds(invokesig, (jl_value_t*)mt, world, &min_valid, &max_valid);
if (matches == jl_nothing) {
valid = 0;
break;
}
matches = (jl_value_t*)((jl_method_match_t*)matches)->method;
if (matches != expected) {
valid = 0;
break;
else {
matches = jl_gf_invoke_lookup_worlds(invokesig, (jl_value_t*)mt, world, &min_valid, &max_valid);
if (matches == jl_nothing) {
valid = 0;
}
else {
matches = (jl_value_t*)((jl_method_match_t*)matches)->method;
if (matches != expected) {
valid = 0;
}
}
}
}
else {
Expand All @@ -2439,30 +2440,32 @@ static jl_array_t *jl_verify_edges(jl_array_t *targets)
-1, 0, world, &min_valid, &max_valid, &ambig);
if (matches == jl_false) {
valid = 0;
break;
}
// setdiff!(matches, expected)
size_t j, k, ins = 0;
if (jl_array_len(matches) != jl_array_len(expected)) {
valid = 0;
if (!_jl_debug_method_invalidation)
break;
}
for (k = 0; k < jl_array_len(matches); k++) {
jl_method_t *match = ((jl_method_match_t*)jl_array_ptr_ref(matches, k))->method;
size_t l = jl_array_len(expected);
for (j = 0; j < l; j++)
if (match == (jl_method_t*)jl_array_ptr_ref(expected, j))
break;
if (j == l) {
// intersection has a new method or a method was
// deleted--this is now probably no good, just invalidate
// everything about it now
else {
// setdiff!(matches, expected)
size_t j, k, ins = 0;
if (jl_array_len(matches) != jl_array_len(expected)) {
valid = 0;
jl_array_ptr_set(matches, ins++, match);
}
for (k = 0; k < jl_array_len(matches); k++) {
jl_method_t *match = ((jl_method_match_t*)jl_array_ptr_ref(matches, k))->method;
size_t l = jl_array_len(expected);
for (j = 0; j < l; j++)
if (match == (jl_method_t*)jl_array_ptr_ref(expected, j))
break;
if (j == l) {
// intersection has a new method or a method was
// deleted--this is now probably no good, just invalidate
// everything about it now
valid = 0;
if (!_jl_debug_method_invalidation)
break;
jl_array_ptr_set(matches, ins++, match);
}
}
if (!valid && _jl_debug_method_invalidation)
jl_array_del_end((jl_array_t*)matches, jl_array_len(matches) - ins);
}
jl_array_del_end((jl_array_t*)matches, jl_array_len(matches) - ins);
}
jl_array_uint8_set(valids, i, valid);
if (!valid && _jl_debug_method_invalidation) {
Expand Down