aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2019-03-29 14:14:27 -0400
committerMike Frysinger <vapier@chromium.org>2019-03-30 03:52:15 +0000
commite2b3b80e439905ba7be9416a61b55df8da0c698f (patch)
treeb8f6d6536c466c9feb0f329f14c927acc28e096d /src/common
parentmac dump_syms: Support .dSYMs > 4GB (partially) (diff)
downloadbreakpad-e2b3b80e439905ba7be9416a61b55df8da0c698f.tar.xz
linux_core_dumper: add explicit casts for exception fields
Some of the fields we save might have signed types depending on the system (e.g. `typedef int pid_t`). Depending on the toolchain, we can trip -Werror=narrowing failures like: src/client/linux/minidump_writer/linux_core_dumper.cc:248:66: error: narrowing conversion of ‘(__pid_t)info->siginfo_t::_sifields.siginfo_t::<anonymous union>::_kill.siginfo_t::<anonymous union>::<anonymous struct>::si_pid’ from ‘__pid_t {aka int}’ to ‘long unsigned int’ inside { } [-Werror=narrowing] set_crash_exception_info({info->si_pid, info->si_uid}); ^^^^^^ src/client/linux/minidump_writer/linux_core_dumper.cc:252:71: error: narrowing conversion of ‘(int)info->siginfo_t::_sifields.siginfo_t::<anonymous union>::_sigsys.siginfo_t::<anonymous union>::<anonymous struct>::_syscall’ from ‘int’ to ‘long unsigned int’ inside { } [-Werror=narrowing] set_crash_exception_info({info->si_syscall, info->si_arch}); ^^^^^^^^^^ Since the exception info fields are all uint64_t which should be large enough to handle all the fields in the siginfo_t structure, add casts for all the assignments to avoid these errors. We have implicit casts even without them, so we aren't changing behavior. Bug: google-breakpad:791 Bug: chromium:945653 Change-Id: Ib04e015998f08b857159ac13e9a065a66d228d49 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1544862 Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common')
0 files changed, 0 insertions, 0 deletions