On Tue, Jul 26, 2022 at 3:24 PM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab@xxxxxxx> wrote:
On 2022/07/26 15:52, lijiang wrote:>>>> Without the patch, the following gcc-11 compliation warning is emitted
>>>> for symbols.c:
>>>>
>>>> symbols.c: In function 'cmd_p':
>>>> symbols.c:7412:38: warning: writing 1 byte into a region of size 0
>>>> [-Wstringop-overflow=]
>>>> 7412 | *(cpuspec-1) = ':';
>>>> | ~~~~~~~~~~~~~^~~~~
>>>>
>>>
>>>
>>> I have one question about it:
>>> This issue only appears in gcc-11 and earlier, I tested it with gcc-12,
>> but
>>> it disappeared. It's interesting.
>> I think that the warning is a false detection. This patch has no behavior
>> change, just a cosmetic change to avoid the warning. I'm not sure, but it
>> might be a gcc bug and fixed in gcc-12.
>>
>
> Probably. Let's leave it there, if it still appears in the future, we can
> pick it up. Any thoughts?
um, I see the warning on RHEL9, what is your concern about fixing this?
If it is not a real issue, we may not need to apply additional patches.
I think it's not bad to suppress this for users/distros using gcc-11,
with the small cosmetic change, not harmful.
However, I can help to ack this one, if you would like to have it.
Thanks.
Lianbo
> The other three patches look good to me: Ack.
> [PATCH 1/4] Fix gcc-11 compilation warnings on filesys.c
> [PATCH 3/4] Fix gcc-11 compilation warning on makedumpfile.c
> [PATCH 4/4] Fix gcc-11 compilation warning on kvmdump.c
Thanks!
Kazu
-- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/crash-utility Contribution Guidelines: https://github.com/crash-utility/crash/wiki