Fix legacy mode detection of the address of an agent allocated variable. In this mode, there exist two executables per each code object, one created by HCC and one created by HIP. Since we dispatch through HCC in legacy mode, we should obtain the address for an agent allocated variable from the latter's executable. Also add two omitted validity checks, whose absence could lead to segfaults when the current process had no .kernel section and / or when an invalid or empty blob was extracted from the latter.

[ROCm/clr commit: 33bb425013]
This commit is contained in:
Alex Voicu
2017-11-30 03:29:04 +00:00
parent c1c4f454d8
commit 76336d46b4
3 changed files with 31 additions and 17 deletions
+1 -1
View File
@@ -288,7 +288,7 @@ namespace
return x->get_type() == SHT_SYMTAB;
});
r = function_names_for(reader, symtab);
if (symtab) r = function_names_for(reader, symtab);
});
return r;