diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 163f9dac384eb..8a696c27fb262 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -267,7 +267,12 @@ class InterpreterStackFrame { lldb::addr_t addr = m_execution_unit.FindSymbol(name, missing_weak); if (addr == LLDB_INVALID_ADDRESS) return false; - value = APInt(m_target_data.getPointerSizeInBits(), addr); + // A resolved symbol address may be wider than a target pointer when we + // store extra information in the high bits, such as an address-space + // tag. Truncate to the pointer width rather than asserting. When the + // address already fits this is a no-op. + value = APInt(m_target_data.getPointerSizeInBits(), addr, + /*isSigned=*/false, /*implicitTrunc=*/true); return true; } break;