bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#42530: 28.0.50; Integer overflows in alloc.c on macOS


From: Philipp Stephani
Subject: bug#42530: 28.0.50; Integer overflows in alloc.c on macOS
Date: Sat, 17 Oct 2020 14:12:03 +0200

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 via email to

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