[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 8/8] migration: use pstrcpy to copy run state
From: |
Alex Bennée |
Subject: |
Re: [PATCH v1 8/8] migration: use pstrcpy to copy run state |
Date: |
Fri, 04 Sep 2020 11:03:51 +0100 |
User-agent: |
mu4e 1.5.5; emacs 28.0.50 |
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> On 9/3/20 2:13 PM, Paolo Bonzini wrote:
>> Il gio 3 set 2020, 13:21 Alex Bennée <alex.bennee@linaro.org
>> <mailto:alex.bennee@linaro.org>> ha scritto:
>>
>> The gcov build triggered:
>>
>> ../../migration/global_state.c:47:5: error: ‘strncpy’ specified
>> bound 100 equals destination size [-Werror=stringop-truncation]
>> strncpy((char *)global_state.runstate
>>
>> As we shouldn't be using strncpy anyway lets use the suggested
>> pstrcpy.
>>
>>
>> This is wrong, we want the all-zeros behavior of strncpy that pstrcpy lacks.
>
> FWIW links to previous discussions:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg584216.html
Hmm I wonder why gprof interfered with the assert. Either way I'll drop
the patch.
>
>>
>> Paolo
--
Alex Bennée
- [PATCH v1 2/8] crypto: fix build with gcrypt enabled, (continued)
- [PATCH v1 2/8] crypto: fix build with gcrypt enabled, Alex Bennée, 2020/09/03
- [PATCH v1 3/8] tests/docker: add python3-setuptools the docker images, Alex Bennée, 2020/09/03
- [PATCH v1 4/8] usb-host: restrict workaround to new libusb versions, Alex Bennée, 2020/09/03
- [PATCH v1 5/8] qemu-iotests: move check-block back to Makefiles, Alex Bennée, 2020/09/03
- [PATCH v1 8/8] migration: use pstrcpy to copy run state, Alex Bennée, 2020/09/03
- [PATCH v1 6/8] tests/meson.build: fp tests don't need CONFIG_TCG, Alex Bennée, 2020/09/03
[PATCH v1 7/8] target/mips: simplify gen_compute_imm_branch logic, Alex Bennée, 2020/09/03
Re: [PATCH v1 0/8] some testing and CI updates (re-greening), Daniel P . Berrangé, 2020/09/03