This is a similar fix as D71498 just for code with less visible impact.
I haven't tried to execute this code, I have no testcase for it.
I have made a [[ https://people.redhat.com/jkratoch/addr_t2.patch | full class wrapper of addr_t ]], not sure if you think it makes sense to upstream it (after cleaning it up a bit). It disclosed these issues:
- GetCrashReasonString
- FIX here: reinterpret_cast<lldb::addr_t>
- NativeProcessLinux::ReadMemory
- safe: reinterpret_cast<void *>
- safe: (void *)addr
- NativeProcessLinux::WriteMemory
- safe: (void *)addr
- Value::GetValueAsData
- safe: reinterpret_cast<uint8_t *>(address)
- ValueObject::GetPointeeData
- safe: (uint8_t *)(addr + offset)
- Type::ReadFromMemory
- safe: reinterpret_cast<uint8_t *>(addr)
- IRMemoryMap::Malloc
- FIX here: (uint64_t)(lldb::addr_t)process_sp.get()
- IRExecutionUnit::GetRunnableInfo
- FIX by D71498: (lldb::addr_t)fun_ptr