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.

此提交包含在:
Alex Voicu
2017-11-30 03:29:04 +00:00
父節點 20fc68c9a1
當前提交 7c0b9a005b
共有 3 個檔案被更改,包括 31 行新增 和 17 行删除
+2
查看文件
@@ -76,6 +76,8 @@ namespace hip_impl
RandomAccessIterator l,
Bundled_code_header& x)
{
if (f == l) return false;
std::copy_n(f, sizeof(x.cbuf_), x.cbuf_);
if (valid(x)) {