unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Arash Esbati <arash@gnu.org>
Cc: stefan@marxist.se, emacs-devel@gnu.org
Subject: Re: Emacs pretest 28.1.90 is out
Date: Fri, 01 Jul 2022 13:59:25 +0300	[thread overview]
Message-ID: <83pmipdroy.fsf@gnu.org> (raw)
In-Reply-To: <86o7y9xq00.fsf@gnu.org> (message from Arash Esbati on Fri, 01 Jul 2022 09:15:43 +0200)

> From: Arash Esbati <arash@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Fri, 01 Jul 2022 09:15:43 +0200
> 
> Stefan Kangas <stefan@marxist.se> writes:
> 
> > The first pretest for what will be the 28.2 release of Emacs (the
> > extensible text editor) is available at:
> >
> >   https://alpha.gnu.org/gnu/emacs/pretest/emacs-28.1.90.tar.xz
> 
> Thanks, builds fine on Win10 with Mingw64 (I ran only ./configure and
> make).  I get only these warnings:
> 
>   CCLD     make-docfile.exe
>   CCLD     make-fingerprint.exe
> In function 'main':
> cc1.exe: warning: '__builtin_memcpy' writing 12 bytes into a region of size between 0 and 7 [-Wstringop-overflow=]
> In file included from ctags.c:2:
> etags.c:1429:21: note: destination object of size [0, 7] allocated by 'xmalloc'
>  1429 |         char *cmd = xmalloc (2 * strlen (tagfile) + sizeof "sort -u -o..");
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Does anyone understand why it says "size [0, 7]"?  The result sizeof
should yield 13, so even if GCC considers the case of strlen returning
zero, the result should be at least 13.  In my case (GCC 9.3)
disassembly of the 'main' function shows that indeed the code calls
strlen and then adds 13 to its result.

There are quite a few hits for -Wstringop-overflow on the Internet, so
maybe this is a GCC bug?  Maybe you should downgrade to a GCC whose
version is not XX.1.0.

I see nothing wrong with that code, FWIW.



  reply	other threads:[~2022-07-01 10:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 12:52 Emacs pretest 28.1.90 is out Stefan Kangas
2022-07-01  7:15 ` Arash Esbati
2022-07-01 10:59   ` Eli Zaretskii [this message]
2022-07-01 12:13     ` Andreas Schwab
2022-07-01 12:42       ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83pmipdroy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=arash@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=stefan@marxist.se \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).