Subject: Re: bug#56095: 29.0.50; nsterm.m, use after free

From: Po Lu <[email-masked]>
Date: Mon, 20 Jun 2022 09:22:32 +0800

Gerd Möllmann <[email-masked]> writes:

> So, I'm trying Emacs on MacOS now, get some non-reproducible
> crashes, built master with ASAN, and the first thing it found is this:
>
> ==61522==ERROR: AddressSanitizer: heap-use-after-free on address 0x00012d7deb90 at pc 0x0001008c1514 bp 0x00016fdf7230 sp 0x00016fdf7228
> WRITE of size 8 at 0x00012d7deb90 thread T0
> ==61522==WARNING: Can't read from symbolizer at fd 25
> ==61522==WARNING: Can't read from symbolizer at fd 26
> ==61522==WARNING: Can't read from symbolizer at fd 27
> ==61522==WARNING: Can't read from symbolizer at fd 28
> ==61522==WARNING: Failed to use and restart external symbolizer!
>     #0 0x1008c1510 in wset_vertical_scroll_bar+0x4c (/Users/gerd/repos/emacs/src/emacs:arm64+0x1008c1510)
>     #1 0x1008c19a0 in -[EmacsScroller judge]+0x360 (/Users/gerd/repos/emacs/src/emacs:arm64+0x1008c19a0)
>     #2 0x1008d641c in ns_judge_scroll_bars+0x224 (/Users/gerd/repos/emacs/src/emacs:arm64+0x1008d641c)
>     #3 0x1000fa4ec in redisplay_internal+0x4ca4 (/Users/gerd/repos/emacs/src/emacs:arm64+0x1000fa4ec)
> ...

Isn't that a bug, since scroll bars should only be judged for windows
that are still reachable?