On 2/7/19 1:30 PM, Peter Maydell wrote: > Currently QEMU has 9 uses of variable length arrays > (found using -Wvla): >
> > Should we be looking to get rid of these and turn on the -Wvla > warning? I know the Linux kernel has recently decided to do this > (some rationale at the start of https://lwn.net/Articles/749064/). A big part of that article was a discussion on how hard it is to write an eval-once macro MAX() that does not trigger a VLA, and that the kernel settled on a second macro for use in constant contexts. Do we want to revist my patch that would add eval-once MAX() and constant-use MAX_CONST(), to make it easier to avoid accidental VLAs? https://lists.gnu.org/archive/html/qemu-devel/2019-01/msg00727.html -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature