Initialize all undef symbols with a magic poison (#1962)

Este cometimento está contido em:
Siu Chi Chan criou e GitHub cometeu 2020-03-26 17:06:09 +05:30
1 ascendente 3e363047d5
cometimento 8fefda2bb9
1 ficheiro modificado
+5 -2
+5 -2
Ver ficheiro
@@ -355,8 +355,11 @@ public:
const auto it1 = get_symbol_addresses().find(x);
if (it1 == get_symbol_addresses().cend()) {
hip_throw(std::runtime_error{
"Global symbol: " + x + " is undefined."});
// For a unknown symbol, initialize it with a magic poison
hsa_executable_agent_global_variable_define(
executable, agent, x.c_str(),
reinterpret_cast<void*>(0xDEADBEEFDEADBEEFull));
continue;
}
hsa_status_t status;