mbox series

[v2,00/11] misc: Remove variable-length arrays on the stack

Message ID 20220819153931.3147384-1-peter.maydell@linaro.org
Headers show
Series misc: Remove variable-length arrays on the stack | expand

Message

Peter Maydell Aug. 19, 2022, 3:39 p.m. UTC
This is a resend of a subset of patches from a series that
Philippe sent out last year:
https://patchew.org/QEMU/20210505211047.1496765-1-philmd@redhat.com/

Basically I just pulled out the patches which:
 (1) trivially applied on a rebase
 (2) had got a Reviewed-by: or at least an Acked-by:

since these should be good to just apply immediately
(well, as soon as we reopen for 7.2 development).

Given they're a mixed bag, I propose to take these via
the target-arm.next tree, unless anybody specifically
wishes to grab specific patches via some other route.

I might come back and have another look at the other
left-behind patches later, but this gets rid of more
than half of the complaints that a -Wvla build reports.

thanks
-- PMM

Philippe Mathieu-Daudé (11):
  chardev/baum: Replace magic values by X_MAX / Y_MAX definitions
  chardev/baum: Use definitions to avoid dynamic stack allocation
  chardev/baum: Avoid dynamic stack allocation
  io/channel-websock: Replace strlen(const_str) by sizeof(const_str) - 1
  hw/net/e1000e_core: Use definition to avoid dynamic stack allocation
  hw/ppc/pnv: Avoid dynamic stack allocation
  hw/intc/xics: Avoid dynamic stack allocation
  hw/i386/multiboot: Avoid dynamic stack allocation
  hw/usb/hcd-ohci: Use definition to avoid dynamic stack allocation
  ui/curses: Avoid dynamic stack allocation
  tests/unit/test-vmstate: Avoid dynamic stack allocation

 chardev/baum.c             | 22 +++++++++++++---------
 hw/i386/multiboot.c        |  5 ++---
 hw/intc/xics.c             |  2 +-
 hw/net/e1000e_core.c       |  7 ++++---
 hw/ppc/pnv.c               |  4 ++--
 hw/ppc/spapr.c             |  8 ++++----
 hw/ppc/spapr_pci_nvlink2.c |  2 +-
 hw/usb/hcd-ohci.c          |  7 ++++---
 io/channel-websock.c       |  2 +-
 tests/unit/test-vmstate.c  |  7 +++----
 ui/curses.c                |  2 +-
 11 files changed, 36 insertions(+), 32 deletions(-)

Comments

Philippe Mathieu-Daudé Aug. 25, 2022, 2:14 p.m. UTC | #1
On 19/8/22 17:39, Peter Maydell wrote:
> This is a resend of a subset of patches from a series that
> Philippe sent out last year:
> https://patchew.org/QEMU/20210505211047.1496765-1-philmd@redhat.com/
> 
> Basically I just pulled out the patches which:
>   (1) trivially applied on a rebase
>   (2) had got a Reviewed-by: or at least an Acked-by:
> 
> since these should be good to just apply immediately
> (well, as soon as we reopen for 7.2 development).
> 
> Given they're a mixed bag, I propose to take these via
> the target-arm.next tree, unless anybody specifically
> wishes to grab specific patches via some other route.
> 
> I might come back and have another look at the other
> left-behind patches later, but this gets rid of more
> than half of the complaints that a -Wvla build reports.
> 
> thanks
> -- PMM

Thank you Peter!