unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#58042: 29.0.50; ASAN use-after-free in re_match_2_internal
@ 2022-09-24 13:45 Gerd Möllmann
  2022-09-24 14:17 ` Gerd Möllmann
                   ` (2 more replies)
  0 siblings, 3 replies; 65+ messages in thread
From: Gerd Möllmann @ 2022-09-24 13:45 UTC (permalink / raw)
  To: 58042

In GNU Emacs 29.0.50 (build 1, aarch64-apple-darwin21.6.0, NS
 appkit-2113.60 Version 12.6 (Build 21G115)) of 2022-09-21 built on
 Mini.fritz.box
Repository revision: 1231a601ebe1fd9fe454c504dbeb9267440242e7
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2113
System Description:  macOS 12.6

Configured using:
 'configure --cache-file /Users/gerd/tmp/config.cache.master
 --with-native-compilation'
 
Configured features:
ACL DBUS GLIB GNUTLS JSON LCMS2 LIBXML2 MODULES NATIVE_COMP NOTIFY
KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TOOLKIT_SCROLL_BARS XIM ZLIB

I got the following ASAN error today.  Unfortunately, I don't have the
slightest idea how to reproduce this.

==79227==ERROR: AddressSanitizer: heap-use-after-free on address 0x00011f81e7d1 at pc 0x0001005825c4 bp 0x00016fdcf370 sp 0x00016fdcf368
READ of size 1 at 0x00011f81e7d1 thread T0
    #0 0x1005825c0 in re_match_2_internal regex-emacs.c:4352
    #1 0x10057e5cc in rpl_re_search_2 regex-emacs.c:3383
    #2 0x10057d1c4 in rpl_re_search regex-emacs.c:3177
    #3 0x10056115c in fast_string_match_internal search.c:492
    #4 0x1005045c0 in fast_string_match lisp.h:4818
    #5 0x100504018 in Ffind_file_name_handler fileio.c:324
    #6 0x1006dbe5c in openp lread.c:1911
    #7 0x1006d8844 in Fload lread.c:1302
    #8 0x1006e1af0 in save_match_data_load lread.c:1630
    #9 0x10064f8cc in load_with_autoload_queue eval.c:2269
    #10 0x10067d2f8 in Frequire fns.c:3274

previously allocated by thread T0 here:
    #0 0x103332ca8 in wrap_malloc+0x94 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3eca8)
    #1 0x1005ae8fc in lmalloc alloc.c:1361
    #2 0x1005b0188 in lisp_malloc alloc.c:994
    #3 0x1005b0a5c in allocate_string_data alloc.c:1889
    #4 0x1005b1bd8 in make_clear_multibyte_string alloc.c:2475
    #5 0x1005b1670 in make_clear_string alloc.c:2443
    #6 0x1005b2714 in make_uninit_string alloc.c:2454
    #7 0x100666c14 in concat_to_string fns.c:821
    #8 0x100666420 in concat2 fns.c:600
    #9 0x1006d7870 in Fget_load_suffixes lread.c:1123
    #10 0x1006d86ac in Fload lread.c:1296
    #11 0x1006e1af0 in save_match_data_load lread.c:1630
    #12 0x10064f8cc in load_with_autoload_queue eval.c:2269

rame #5: 0x00000001005825c4 emacs`re_match_2_internal(bufp=0x000000010111b890, string1=0x0000000000000000, size1=0, string2="/Users/gerd/.config/emacs.d.default/elpa/company-0.9.13/lsp-protocol.el.gz", size2=74, pos=0, regs=0x0000000000000000, stop=74) at regex-emacs.c:4352:18
   4349	
   4350		    PREFETCH ();
   4351		    int len;
-> 4352		    int corig = RE_STRING_CHAR_AND_LENGTH (d, len, target_multibyte);
   4353		    int c = corig;
   4354		    if (target_multibyte)
   4355		      {

And to make things worse, I can't get an xbacktrace because the "new"
lldb, which I got with Xcode 14, says it has a bug.  Tadah :-/.

(lldb) xbacktrace
PLEASE submit a bug report to https://developer.apple.com/bug-reporting/ and include the crash backtrace.
Stack dump:






^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2023-05-09  5:30 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-24 13:45 bug#58042: 29.0.50; ASAN use-after-free in re_match_2_internal Gerd Möllmann
2022-09-24 14:17 ` Gerd Möllmann
2022-09-24 14:48   ` Gerd Möllmann
2022-09-24 14:56   ` Eli Zaretskii
2022-09-24 15:08     ` Gerd Möllmann
2022-09-24 15:24       ` Eli Zaretskii
2022-09-25  5:50         ` Gerd Möllmann
2022-09-25  6:32           ` Eli Zaretskii
2022-09-25  7:06             ` Gerd Möllmann
2022-09-25  8:08               ` Eli Zaretskii
2022-09-25  8:28                 ` Gerd Möllmann
2022-09-25  8:43                   ` Eli Zaretskii
2022-09-26  5:13                     ` Gerd Möllmann
2022-10-04 14:33 ` Gerd Möllmann
2022-10-04 16:35   ` Eli Zaretskii
2022-10-05  4:37     ` Gerd Möllmann
2022-10-05  6:16       ` Eli Zaretskii
2022-10-05  6:58         ` Gerd Möllmann
2022-10-05  7:22           ` Eli Zaretskii
2022-10-05  7:34             ` Gerd Möllmann
2022-10-05  9:00               ` Gerd Möllmann
2022-10-05  9:23                 ` Eli Zaretskii
2022-10-05 10:14                   ` Gerd Möllmann
2022-10-05 10:24                     ` Gerd Möllmann
2022-10-05 10:43                       ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 10:49                         ` Gerd Möllmann
2022-10-05 11:10                           ` Gerd Möllmann
2022-10-05 11:15                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 11:37                               ` Gerd Möllmann
2022-10-05 13:37                               ` Eli Zaretskii
2022-10-05 13:52                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 14:09                                   ` Eli Zaretskii
2022-10-05 14:24                                     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 13:27                             ` Eli Zaretskii
2022-10-05 13:31                               ` Gerd Möllmann
2022-10-05 13:55                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-08 14:01                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-09  1:04                           ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-09  2:25                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-05-09  5:30                             ` Eli Zaretskii
2022-10-05 10:45                       ` Gerd Möllmann
2022-10-05 11:10                         ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 11:15                           ` Gerd Möllmann
2022-10-05 11:23                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 11:35                               ` Gerd Möllmann
2022-10-05 12:02                               ` Gerd Möllmann
2022-10-05 12:08                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 13:40                               ` Eli Zaretskii
2022-10-05 13:53                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 14:10                                   ` Eli Zaretskii
2022-10-05 12:05                             ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 12:32                               ` Gerd Möllmann
2022-10-05 12:38                                 ` Gerd Möllmann
2022-10-05 12:49                                   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-05 12:48                                 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-06  5:20                                   ` Gerd Möllmann
2022-10-05 13:39                           ` Eli Zaretskii
2022-10-05 13:13                         ` Eli Zaretskii
2022-10-05 13:24                           ` Gerd Möllmann
2022-10-05 12:59                     ` Eli Zaretskii
2022-10-06  5:35 ` Gerd Möllmann
2022-10-06  6:59   ` Eli Zaretskii
2022-10-06  7:21     ` Gerd Möllmann
2022-10-06  8:08       ` Eli Zaretskii
2022-10-06  8:23         ` Gerd Möllmann

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