diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/breakpad/sanitizer.patch | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | external/breakpad/sanitizer.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/external/breakpad/sanitizer.patch b/external/breakpad/sanitizer.patch new file mode 100644 index 000000000..5d673103d --- /dev/null +++ b/external/breakpad/sanitizer.patch @@ -0,0 +1,29 @@ +--- src/client/linux/minidump_writer/minidump_writer.cc ++++ src/client/linux/minidump_writer/minidump_writer.cc +@@ -717,7 +717,7 @@ + const std::vector<uint64_t> crash_exception_info = + dumper_->crash_exception_info(); + stream->exception_record.number_parameters = crash_exception_info.size(); +- memcpy(stream->exception_record.exception_information, ++ if (!crash_exception_info.empty()) memcpy(stream->exception_record.exception_information, + crash_exception_info.data(), + sizeof(uint64_t) * crash_exception_info.size()); + stream->thread_context = crashing_thread_context_; +@@ -760,7 +760,7 @@ + // Adjust base address with the virtual address of the PT_LOAD segment + // corresponding to offset 0 + if (ph.p_type == PT_LOAD && ph.p_offset == 0) { +- base -= ph.p_vaddr; ++ base = reinterpret_cast<char*>(reinterpret_cast<uintptr_t>(base) - ph.p_vaddr); + } + if (ph.p_type == PT_DYNAMIC) { + dyn_addr = ph.p_vaddr; +@@ -769,7 +769,7 @@ + if (!dyn_addr) + return false; + +- ElfW(Dyn)* dynamic = reinterpret_cast<ElfW(Dyn)*>(dyn_addr + base); ++ ElfW(Dyn)* dynamic = reinterpret_cast<ElfW(Dyn)*>(dyn_addr + reinterpret_cast<uintptr_t>(base)); + + // The dynamic linker makes information available that helps gdb find all + // DSOs loaded into the program. If this information is indeed available, |