aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/linux/minidump_writer/linux_core_dumper.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/client/linux/minidump_writer/linux_core_dumper.cc b/src/client/linux/minidump_writer/linux_core_dumper.cc
index 3b1eabb4..41506898 100644
--- a/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ b/src/client/linux/minidump_writer/linux_core_dumper.cc
@@ -242,14 +242,21 @@ bool LinuxCoreDumper::EnumerateThreads() {
break;
}
- // Set crash_exception_info for common signals.
+ // Set crash_exception_info for common signals. Since exception info is
+ // unsigned, but some of these fields might be signed, we always cast.
switch (info->si_signo) {
case MD_EXCEPTION_CODE_LIN_SIGKILL:
- set_crash_exception_info({info->si_pid, info->si_uid});
+ set_crash_exception_info({
+ static_cast<uint64_t>(info->si_pid),
+ static_cast<uint64_t>(info->si_uid),
+ });
break;
case MD_EXCEPTION_CODE_LIN_SIGSYS:
#ifdef si_syscall
- set_crash_exception_info({info->si_syscall, info->si_arch});
+ set_crash_exception_info({
+ static_cast<uint64_t>(info->si_syscall),
+ static_cast<uint64_t>(info->si_arch),
+ });
#endif
break;
}