From mboxrd@z Thu Jan 1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Philipp Stephani
Newsgroups: gmane.emacs.bugs
Subject: bug#42530: 28.0.50; Integer overflows in alloc.c on macOS
Date: Sat, 17 Oct 2020 14:12:03 +0200
Message-ID:
References: <87k0vpusr0.fsf@gnus.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
logging-data="11559"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: 42530@debbugs.gnu.org
To: Lars Ingebrigtsen
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 17 14:13:11 2020
Return-path:
Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org
Original-Received: from lists.gnu.org ([209.51.188.17])
by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92)
(envelope-from )
id 1kTl5C-0002v0-Sc
for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Oct 2020 14:13:10 +0200
Original-Received: from localhost ([::1]:54696 helo=lists1p.gnu.org)
by lists.gnu.org with esmtp (Exim 4.90_1)
(envelope-from )
id 1kTl5B-00058e-Ra
for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 17 Oct 2020 08:13:09 -0400
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49552)
by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.90_1) (envelope-from )
id 1kTl54-00058R-Ng
for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 08:13:02 -0400
Original-Received: from debbugs.gnu.org ([209.51.188.43]:50319)
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
(Exim 4.90_1) (envelope-from )
id 1kTl54-0000I4-ER
for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 08:13:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
(envelope-from ) id 1kTl54-0006FD-AJ
for bug-gnu-emacs@gnu.org; Sat, 17 Oct 2020 08:13:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Philipp Stephani
Original-Sender: "Debbugs-submit"
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sat, 17 Oct 2020 12:13:02 +0000
Resent-Message-ID:
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 42530
X-GNU-PR-Package: emacs
Original-Received: via spool by 42530-submit@debbugs.gnu.org id=B42530.160293674223947
(code B ref 42530); Sat, 17 Oct 2020 12:13:02 +0000
Original-Received: (at 42530) by debbugs.gnu.org; 17 Oct 2020 12:12:22 +0000
Original-Received: from localhost ([127.0.0.1]:33630 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from )
id 1kTl4P-0006EB-MU
for submit@debbugs.gnu.org; Sat, 17 Oct 2020 08:12:21 -0400
Original-Received: from mail-oi1-f171.google.com ([209.85.167.171]:45457)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from ) id 1kTl4O-0006Dx-JX
for 42530@debbugs.gnu.org; Sat, 17 Oct 2020 08:12:21 -0400
Original-Received: by mail-oi1-f171.google.com with SMTP id j7so5728919oie.12
for <42530@debbugs.gnu.org>; Sat, 17 Oct 2020 05:12:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
h=mime-version:references:in-reply-to:from:date:message-id:subject:to
:cc; bh=AEPKmeWmK8IXDMBTl1Uiw+N/JFawBK11A6LMuE9swQE=;
b=BehDbM5GqjBqAezyK+AmETbbNh73QHcwQJydztEeoAZcTvhKpIo+XFadHRe0tIF1Aj
xukBOAjweI5vbw1ZAMaCRuAbN/Wsoaa0uIMyP7CK5p84DSqca7uQeUNMl29t5LhkIwqX
2baja15X2xK2IqcHtrBypLDrdGZ7gHjEHQZqYKWVa8XBBvFXWzZCEQMWD9TD5xQVUEMH
G8B+2fACVboaFFhC3Ff5kHg1QWYHHeZvNw5PmSEN3kUtrcygyf2Q5CaB/62SUng5095E
Yb8x2wesr38jk4MHggL/YcVOFfqmUNfPq6ZKhXsMiWjUvPaf3FzFatUQrYl2vvs8Y4jY
iDVQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:references:in-reply-to:from:date
:message-id:subject:to:cc;
bh=AEPKmeWmK8IXDMBTl1Uiw+N/JFawBK11A6LMuE9swQE=;
b=eUMN7PJiH5KWutv95vPosCg5kAyGC3nBTI5sq5qlmgSYeydon8NutErKCMpFTOGXUu
kRR1GCc1EqLKOESltSYMi+HbfPfS04Jp7//6zjjXUHsGy8048Z6i1gTlW7/LN0w1SXW2
NqIxBTVv0BYwfM0pZqIohTNRMGyAjKzeXZKcMPqKr3ovlYmh9ux4g1HTKmxvLWdtNVd8
U7PuIK4YhIKfZhHL9EvcyGSbitNIknLrtYQR9TJrGa/4kDjLJeKTgWPjqzxsVLHjJWWn
S6sZOC0aKgyjwEVGdn/ViWTIjLbM9shoCGwm0SAZx2cSFSmpRMtAQghN8hY638jQDecw
cITw==
X-Gm-Message-State: AOAM5312DyvVjxjNzDLyaNxASVjZHrXDU3VTT0oEb3mcxiR+lvbOT8UR
G53wo7Cm0ZpTxCg2VUaKItb9jfIuYQDdaJ4VyaA=
X-Google-Smtp-Source: ABdhPJwuZfnVDJa02bOzFgGKCd0voJH+jSnGEA9txfG4MdtcncDbesabKCbkQIdDHZTSGHS5O7P74rjlnQmw2gy0F9s=
X-Received: by 2002:a05:6808:2:: with SMTP id u2mr5599620oic.170.1602936734636;
Sat, 17 Oct 2020 05:12:14 -0700 (PDT)
In-Reply-To: <87k0vpusr0.fsf@gnus.org>
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
the Swiss army knife of text editors"
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org
Original-Sender: "bug-gnu-emacs"
Xref: news.gmane.io gmane.emacs.bugs:190806
Archived-At:
Am Sa., 17. Okt. 2020 um 11:06 Uhr schrieb Lars Ingebrigtsen :
>
> Philipp 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
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.