public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "david at ixit dot cz" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-109744-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109744

            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=55006&action=edit
panvk_cmd_buffer.c.i.gz

Compiler: gcc version 12.2.0 (Debian 12.2.0-14) 
!!! Fixed in: gcc version 13.0.1 20230315 (experimental) [master
r13-6680-ga9ae16db8cb] (Debian 20230315-1) 
Commands:
meson setup builddir-snapshot -D libdir=lib -D buildtype=release -D
build-tests=false -D enable-glcpp-tests=false -D libunwind=enabled -D glx=dri
-D gbm=enabled -D egl=enabled -D platforms=x11,wayland -D dri3=enabled -D
gallium-extra-hud=true -D gallium-vdpau=disabled -D gallium-omx=disabled -D
gallium-va=disabled -D gallium-xa=disabled -D gallium-nine=false -D
gallium-opencl=disabled -D gallium-rusticl=false -D llvm=enabled -D
gallium-drivers=r300,i915,iris,swrast -D vulkan-drivers=panfrost -D
video-codecs=h264dec,h264enc,h265dec,h265enc -D spirv-to-dxil=false -D
osmesa=true -D intel-clc=disabled -D imagination-srv=false -Dc_args=-save-temps
-Dcpp_args=-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 ‘util_dynarray_init’,
    inlined from ‘panvk_CmdBeginRenderPass2’ at
../src/panfrost/vulkan/panvk_cmd_buffer.c:507:4:
../src/util/u_dynarray.h:58:4: warning: ‘memset’ 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.

             reply	other threads:[~2023-05-05  9:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05  9:16 david at ixit dot cz [this message]
2023-05-05  9:33 ` [Bug c/109744] mesa/panvk: " sjames at gcc dot gnu.org
2023-05-05 20:08 ` [Bug tree-optimization/109744] " david at ixit dot cz
2024-01-10 17:47 ` jamborm at gcc dot gnu.org
2024-01-20 19:49 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109744-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).