qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]