From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F10F23858D28; Wed, 3 May 2023 14:36:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F10F23858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683124596; bh=2C7g/Q8966tu2M6UKfc8IhTWC5rjufaydCtcLPX31Ik=; h=From:To:Subject:Date:From; b=Uuna8Z2D2/BCA6+QISeiQnc+Ytl9BtfeEI85QSWqbrL0LdQ+q/X0kb8VyL77oGfRq tafLjkvmn5uiUBuExLpV7qze+P9AkWs8KMGzqvArxWSlstzFt5h/V/qMmnk/dXRbRW gNU+o5wEVHdPlrC1wIcAv+nLTN32XayOVi5jTmmE= From: "david at ixit dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/109716] New: bogus stringop-overread "reading 4 bytes from a region of size 0" Date: Wed, 03 May 2023 14:36:36 +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: 13.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 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=3D109716 Bug ID: 109716 Summary: bogus stringop-overread "reading 4 bytes from a region of size 0" Product: gcc Version: 13.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 Compiler: 12.2.0, 13.0.1 20230315 (experimental) [master r13-6680-ga9ae16db= 8cb] Sources: https://gitlab.freedesktop.org/mesa/mesa/ main branch, (commit b59935e2e77ed6ccf210103b028d671ee277a607 ) Command: CC=3D/usr/lib/gcc-snapshot/bin/gcc CXX=3D/usr/lib/gcc-snapshot/bin= /g++ 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 ``` [1447/1646] Compiling C object src/gallium/drivers/r300/libr300.a.p/r300_state_derived.c.o ../src/gallium/drivers/r300/r300_state_derived.c: In function 'r300_get_border_color': ../src/gallium/drivers/r300/r300_state_derived.c:676:5: warning: 'util_format_unswizzle_4f' reading 4 bytes from a region of size 0 [-Wstringop-overread] 676 | util_format_unswizzle_4f(border_swizzled, border, desc->swizzle= ); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/gallium/drivers/r300/r300_state_derived.c:676:5: note: referencing argument 3 of type 'const unsigned char[4]' In file included from ../src/compiler/nir/nir.h:43, from ../src/gallium/auxiliary/draw/draw_context.h:42, from ../src/gallium/drivers/r300/r300_state_derived.c:24: ../src/util/format/u_format.h:1684:6: note: in a call to function 'util_format_unswizzle_4f' 1684 | void util_format_unswizzle_4f(float *dst, const float *src, | ^~~~~~~~~~~~~~~~~~~~~~~~ ``` Our project bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8651=