1 --- src/client/linux/minidump_writer/minidump_writer.cc
2 +++ src/client/linux/minidump_writer/minidump_writer.cc
4 const std::vector<uint64_t> crash_exception_info =
5 dumper_->crash_exception_info();
6 stream->exception_record.number_parameters = crash_exception_info.size();
7 - memcpy(stream->exception_record.exception_information,
8 + if (!crash_exception_info.empty()) memcpy(stream->exception_record.exception_information,
9 crash_exception_info.data(),
10 sizeof(uint64_t) * crash_exception_info.size());
11 stream->thread_context = crashing_thread_context_;
13 // Adjust base address with the virtual address of the PT_LOAD segment
14 // corresponding to offset 0
15 if (ph.p_type == PT_LOAD && ph.p_offset == 0) {
17 + base = reinterpret_cast<char*>(reinterpret_cast<uintptr_t>(base) - ph.p_vaddr);
19 if (ph.p_type == PT_DYNAMIC) {
20 dyn_addr = ph.p_vaddr;
25 - ElfW(Dyn)* dynamic = reinterpret_cast<ElfW(Dyn)*>(dyn_addr + base);
26 + ElfW(Dyn)* dynamic = reinterpret_cast<ElfW(Dyn)*>(dyn_addr + reinterpret_cast<uintptr_t>(base));
28 // The dynamic linker makes information available that helps gdb find all
29 // DSOs loaded into the program. If this information is indeed available,