binutils-gdb/gdb/nat
Sergei Trofimovich 486f9e20e0 gdb/nat/linux-osdata.c: fix build on gcc-12 (string overfow)
On gcc-12 build fails as:

    ../../gdbserver/../gdb/nat/linux-osdata.c: In function 'void linux_xfer_osdata_processes(buffer*)':
    ../../gdbserver/../gdb/nat/linux-osdata.c:330:39: error:
      '__builtin___sprintf_chk' may write a terminating nul past the end of the destination [-Werror=format-overflow=]
      330 |                 sprintf (core_str, "%d", i);
          |                                       ^

It's an off-by-one case in an infeasible scenario for negative
huge core count. The change switches to std::string for memory
handling.

Tested by running 'info os processes' and checking CPU cores column.
2021-11-17 08:13:18 +00:00
..
aarch64-linux-hw-point.c Fix ARMv8.4 for hw watchpoint and breakpoint 2021-10-21 19:02:02 +00:00
aarch64-linux-hw-point.h Fix ARMv8.4 for hw watchpoint and breakpoint 2021-10-21 19:02:02 +00:00
aarch64-linux.c
aarch64-linux.h
aarch64-mte-linux-ptrace.c
aarch64-mte-linux-ptrace.h
aarch64-sve-linux-ptrace.c
aarch64-sve-linux-ptrace.h
aarch64-sve-linux-sigcontext.h
amd64-linux-siginfo.c
amd64-linux-siginfo.h
fork-inferior.c gdb, gdbserver: make target_waitstatus safe 2021-10-21 16:13:56 -04:00
fork-inferior.h
gdb_ptrace.h
gdb_thread_db.h
glibc_thread_db.h
linux-btrace.c
linux-btrace.h
linux-namespaces.c gdbsupport: make gdb_open_cloexec return scoped_fd 2021-09-30 15:21:48 -04:00
linux-namespaces.h
linux-nat.h
linux-osdata.c gdb/nat/linux-osdata.c: fix build on gcc-12 (string overfow) 2021-11-17 08:13:18 +00:00
linux-osdata.h
linux-personality.c Fix build on rhES5 2021-11-09 08:21:18 -07:00
linux-personality.h
linux-procfs.c Remove defaulted 'tid' parameter to ptid_t constructor 2021-09-23 09:30:54 -06:00
linux-procfs.h
linux-ptrace.c
linux-ptrace.h
linux-waitpid.c
linux-waitpid.h
mips-linux-watch.c
mips-linux-watch.h
netbsd-nat.c
netbsd-nat.h
ppc-linux.c
ppc-linux.h
riscv-linux-tdesc.c
riscv-linux-tdesc.h
windows-nat.c gdb, gdbserver: make target_waitstatus safe 2021-10-21 16:13:56 -04:00
windows-nat.h
x86-cpuid.h
x86-dregs.c Use CORE_ADDR as return type from x86_dr_low_get_addr 2021-09-03 11:30:46 -06:00
x86-dregs.h
x86-gcc-cpuid.h
x86-linux-dregs.c
x86-linux-dregs.h
x86-linux.c
x86-linux.h