Reset link_map map in the constructor
Change-Id: I8a6ad3bc0fca790dec2992cacf9288068b3bcaa3
This commit is contained in:
@@ -188,6 +188,10 @@ static void RemoveCodeObjectInfoFromDebugMap(link_map* map) {
|
||||
if (r_debug_tail == map) {
|
||||
r_debug_tail = map->l_prev;
|
||||
}
|
||||
if (_amdgpu_r_debug.r_map == map) {
|
||||
_amdgpu_r_debug.r_map = map->l_next;
|
||||
}
|
||||
|
||||
if (map->l_prev) {
|
||||
map->l_prev->l_next = map->l_next;
|
||||
}
|
||||
@@ -196,6 +200,7 @@ static void RemoveCodeObjectInfoFromDebugMap(link_map* map) {
|
||||
}
|
||||
|
||||
delete map->l_name;
|
||||
memset(map, 0, sizeof(link_map));
|
||||
}
|
||||
|
||||
hsa_status_t AmdHsaCodeLoader::FreezeExecutable(Executable *executable, const char *options) {
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
#include <cstring>
|
||||
#include "hsa.h"
|
||||
#include "hsa_ext_image.h"
|
||||
#include "amd_hsa_loader.hpp"
|
||||
@@ -295,7 +296,9 @@ private:
|
||||
|
||||
public:
|
||||
LoadedCodeObjectImpl(ExecutableImpl *owner_, hsa_agent_t agent_, const void *elf_data_, size_t elf_size_)
|
||||
: ExecutableObject(owner_, agent_), elf_data(elf_data_), elf_size(elf_size_) {}
|
||||
: ExecutableObject(owner_, agent_), elf_data(elf_data_), elf_size(elf_size_) {
|
||||
memset(&r_debug_info, 0, sizeof(r_debug_info));
|
||||
}
|
||||
|
||||
const void* ElfData() const { return elf_data; }
|
||||
size_t ElfSize() const { return elf_size; }
|
||||
|
||||
Reference in New Issue
Block a user