unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 42530@debbugs.gnu.org
Subject: bug#42530: 28.0.50; Integer overflows in alloc.c on macOS
Date: Sat, 17 Oct 2020 14:12:03 +0200	[thread overview]
Message-ID: <CAArVCkRpYSKms+0NWYo2k106=htkuudq7FStPVa3FNjA6gPpPQ@mail.gmail.com> (raw)
In-Reply-To: <87k0vpusr0.fsf@gnus.org>

Am Sa., 17. Okt. 2020 um 11:06 Uhr schrieb Lars Ingebrigtsen <larsi@gnus.org>:
>
> Philipp <p.stephani2@gmail.com> writes:
>
> > -fsanitize=undefined finds the following integer overflows in alloc.c:
> >
> > alloc.c:4641:33: runtime error: addition of unsigned offset to 0x000102496c05 overflowed to 0x000102496c00
> > SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior alloc.c:4641:33 in
> > alloc.c:4852:9: runtime error: pointer index expression with base 0xffffffffffffffff overflowed to 0x00010344053f
> > SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior alloc.c:4852:9 in
>
> How do you reproduce this?  I tried
>
> ./configure CFLAGS='-g3 -O1 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer' --with-modules --without-xml2 --without-pop --with-mailutils --enable-gcc-warnings=warn-only --enable-checking=all --enable-check-lisp-object-type
>
> and then started Emacs (on Catalina), but didn't get any errors as far
> as I can see.

According to 'git bisect' this was fixed by

commit 069b58b7c852b59f8ef7642e21db339626045671
Author: Philipp Stephani <phst@google.com>
Date:   Sun Aug 2 12:58:44 2020 +0200

    * src/alloc.c (mark_memory): Avoid signed integer overflow

 src/alloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

and probably other commits around that time.





  reply	other threads:[~2020-10-17 12:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-25 17:20 bug#42530: 28.0.50; Integer overflows in alloc.c on macOS Philipp
2020-10-17  9:05 ` Lars Ingebrigtsen
2020-10-17 12:12   ` Philipp Stephani [this message]
2020-10-18  8:15     ` Lars Ingebrigtsen

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='CAArVCkRpYSKms+0NWYo2k106=htkuudq7FStPVa3FNjA6gPpPQ@mail.gmail.com' \
    --to=p.stephani2@gmail.com \
    --cc=42530@debbugs.gnu.org \
    --cc=larsi@gnus.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.
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).