From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DFE1F3858D20; Fri, 5 May 2023 09:16:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DFE1F3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683278207; bh=+VgQl/c2d1hWMnO/QCXxHHVh22B5oPU5OMwORvCZAII=; h=From:To:Subject:Date:From; b=jkAke5bcBhhmKF2rqIe9MniwtqpRiZYADqrfENXTsIyztDl3nPjG9wPLAaS6VYOg5 GAVLS1O/10wwHON74ND06B3gclxeMU4aXxabQifzUUvL8Xu0Ny9R72qrbXjZZ8Nmn6 sLT4ZCQeI5yWGsNdAfZkg/x0LfPcC3+1XkO7L1Hs= From: "david at ixit dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109744] New: bogus Warray-bounds on gcc 12.2, fixed in 13 branch Date: Fri, 05 May 2023 09:16:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: david at ixit dot cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109744 Bug ID: 109744 Summary: bogus Warray-bounds on gcc 12.2, fixed in 13 branch Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: david at ixit dot cz Target Milestone: --- Host: x86_64 Target: x86_64 Created attachment 55006 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55006&action=3Dedit panvk_cmd_buffer.c.i.gz Compiler: gcc version 12.2.0 (Debian 12.2.0-14)=20 !!! Fixed in: gcc version 13.0.1 20230315 (experimental) [master r13-6680-ga9ae16db8cb] (Debian 20230315-1)=20 Commands: meson setup builddir-snapshot -D libdir=3Dlib -D buildtype=3Drelease -D build-tests=3Dfalse -D enable-glcpp-tests=3Dfalse -D libunwind=3Denabled -D= glx=3Ddri -D gbm=3Denabled -D egl=3Denabled -D platforms=3Dx11,wayland -D dri3=3Denab= led -D gallium-extra-hud=3Dtrue -D gallium-vdpau=3Ddisabled -D gallium-omx=3Ddisab= led -D gallium-va=3Ddisabled -D gallium-xa=3Ddisabled -D gallium-nine=3Dfalse -D gallium-opencl=3Ddisabled -D gallium-rusticl=3Dfalse -D llvm=3Denabled -D gallium-drivers=3Dr300,i915,iris,swrast -D vulkan-drivers=3Dpanfrost -D video-codecs=3Dh264dec,h264enc,h265dec,h265enc -D spirv-to-dxil=3Dfalse -D osmesa=3Dtrue -D intel-clc=3Ddisabled -D imagination-srv=3Dfalse -Dc_args= =3D-save-temps -Dcpp_args=3D-save-temps cd builddir-snapshot && meson compile ``` [756/1419] Compiling C object src/panfrost/vulkan/libvulkan_panfrost.so.p/panvk_cmd_buffer.c.o In file included from ../src/vulkan/runtime/vk_command_buffer.h:32, from ../src/panfrost/vulkan/panvk_private.h:53, from ../src/panfrost/vulkan/panvk_cmd_buffer.c:29: In function =E2=80=98util_dynarray_init=E2=80=99, inlined from =E2=80=98panvk_CmdBeginRenderPass2=E2=80=99 at ../src/panfrost/vulkan/panvk_cmd_buffer.c:507:4: ../src/util/u_dynarray.h:58:4: warning: =E2=80=98memset=E2=80=99 offset [0,= 15] is out of the bounds [0, 0] [-Warray-bounds] 58 | memset(buf, 0, sizeof(*buf)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Ref: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8638 Feel free to close, if there is no intention to backport fix from 13 branch= .=