emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pdumper.c Wstringop-overflow warnings with CFLAGS="-O3" [Re: Emacs 29.2


From: N. Jackson
Subject: pdumper.c Wstringop-overflow warnings with CFLAGS="-O3" [Re: Emacs 29.2 released]
Date: Fri, 19 Jan 2024 01:40:31 +0000

At 13:06 +0200 on Thursday 2024-01-18, Eli Zaretskii wrote:
>
> Version 29.2 of Emacs, the extensible text editor, should now
> be available

Thank you Eli for your stalwart maintenance of Emacs and to everyone
else who has contributed recently (and, indeed, ever).

Building Emacs 29.2 with CFLAGS="-O3" I get four Wstringop-overflow
warnings in pdumper.c (see below).  Can I (as an Emacs user) safely
ignore these warnings?  Note: I don't get these warnings with
CFLAGS="-O2".

My version of gcc is:

  gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4)

The four warnings are:

  In function ‘dump_field_lv_or_rawptr’,
      inlined from ‘dump_field_lv_rawptr’ at pdumper.c:1882:3,
      inlined from ‘dump_field_finalizer_ref’ at pdumper.c:2205:5,
      inlined from ‘dump_field_finalizer_ref’ at pdumper.c:2197:1,
      inlined from ‘dump_finalizer’ at pdumper.c:2222:3:
  pdumper.c:1863:3: warning: writing 8 bytes into a region of size 0 
[-Wstringop-overflow=]
   1863 |   memcpy (out_field, &out_value, sizeof (out_value));
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and

  In function ‘cpyptr’,
      inlined from ‘dump_field_emacs_ptr’ at pdumper.c:1967:3,
      inlined from ‘dump_field_emacs_ptr’ at pdumper.c:1949:1,
      inlined from ‘dump_field_finalizer_ref’ at pdumper.c:2203:5,
      inlined from ‘dump_finalizer’ at pdumper.c:2222:3:
  pdumper.c:1774:3: warning: writing 8 bytes into a region of size 0 
[-Wstringop-overflow=]
   1774 |   memcpy (out, in, sizeof (void *));
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and

  In function ‘cpyptr’,
      inlined from ‘dump_field_emacs_ptr’ at pdumper.c:1967:3,
      inlined from ‘dump_field_emacs_ptr’ at pdumper.c:1949:1,
      inlined from ‘dump_field_finalizer_ref’ at pdumper.c:2203:5,
      inlined from ‘dump_finalizer’ at pdumper.c:2223:3:
  pdumper.c:1774:3: warning: writing 8 bytes into a region of size 0 
[-Wstringop-overflow=]
   1774 |   memcpy (out, in, sizeof (void *));
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and

  In function ‘dump_field_lv_or_rawptr’,
      inlined from ‘dump_field_lv_rawptr’ at pdumper.c:1882:3,
      inlined from ‘dump_field_finalizer_ref’ at pdumper.c:2205:5,
      inlined from ‘dump_field_finalizer_ref’ at pdumper.c:2197:1,
      inlined from ‘dump_finalizer’ at pdumper.c:2223:3:
  pdumper.c:1863:3: warning: writing 8 bytes into a region of size 0 
[-Wstringop-overflow=]
   1863 |   memcpy (out_field, &out_value, sizeof (out_value));
        |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks.

N.



reply via email to

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