#931651 false positive: Match data clobbered by buffer modification hooks

Package:
emacs-nox
Source:
emacs
Description:
GNU Emacs editor (without GUI support)
Submitter:
Nicholas D Steeves
Date:
2022-01-31 17:27:07 UTC
Severity:
normal
Tags:
#931651#5
Date:
2019-07-08 19:15:43 UTC
From:
To:
Hi Rob,

I'm making this copy of David's upstream bug in the hopes that someone
might be inspired to work on it from our side.  Please add any
usertags that would make it more discoverable for someone at DebCamp.

Upstream requested reproducing with Emacs 26.2 after David filed this bug:

1. Save the following as test.el

(let ((inhibit-modification-hooks t))
  (with-temp-buffer
    (insert "P'")
    (goto-char (point-min))
    (while (re-search-forward "\\([^\\]\\)'" nil t)
      (replace-match    "\\1`"))
    (buffer-substring (point-min) (point-max))))

2. run "emacs --batch --quick --load ./test.el"

3. Under docker, with Debian's emacs-nox (but not emacs-lucid or
   emacs-gtk, I get an error "Match data clobbered by buffer modification
   hooks".

I don't think this is Debian specific, as someone was also able to
duplicate it with "nixpkgs.emacs26-nox" (also in Docker).

I agree the setup sounds pretty specific, but it is used by a Debian CI
setup, which is why I care.

Here's the build info, copied out of docker:

In GNU Emacs 26.1 (build 2, x86_64-pc-linux-gnu)
 of 2019-02-03, modified by Debian built on zam904
Recent messages:
Loading /etc/emacs/site-start.d/00debian.el (source)...done
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --enable-libsystemd --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --enable-libsystemd
 --with-pop=yes
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/26.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/26.1/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-mailutils --with-x=no
 --without-gsettings 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs-26.1+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro'

#931651#10
Date:
2019-07-25 01:16:57 UTC
From:
To:
Nicholas D Steeves <nsteeves@gmail.com> writes:

This bug is not docker specific, it seems.  I saw this bug today on
zelenka, s390x porterbox. To duplicate

0) copy the notmuch-0.29.1-2 dsc to zelenka
1) set up a schroot session
2) dd-schroot-command -c <session> apt-get build-dep notmuch
3) schoot -c <session>
4) depkg-buildpackage -us -us -b

#931651#15
Date:
2019-07-25 12:45:11 UTC
From:
To:
David Bremner <david@tethera.net> writes:

the above reproducer sequence can be simplified to

0) set up a sid chroot on zelenka
1) install emacs-nox in that chroot
2) run the sample elisp code per the first message in the bug.

d

#931651#20
Date:
2019-07-25 01:16:57 UTC
From:
To:
Nicholas D Steeves <nsteeves@gmail.com> writes:

This bug is not docker specific, it seems.  I saw this bug today on
zelenka, s390x porterbox. To duplicate

0) copy the notmuch-0.29.1-2 dsc to zelenka
1) set up a schroot session
2) dd-schroot-command -c <session> apt-get build-dep notmuch
3) schoot -c <session>
4) depkg-buildpackage -us -us -b

#931651#25
Date:
2019-07-25 12:45:11 UTC
From:
To:
David Bremner <david@tethera.net> writes:

the above reproducer sequence can be simplified to

0) set up a sid chroot on zelenka
1) install emacs-nox in that chroot
2) run the sample elisp code per the first message in the bug.

d

#931651#30
Date:
2020-06-22 23:25:04 UTC
From:
To:
David Bremner <david@tethera.net> writes:

I can now duplicate this with emacs-nox 1:26.3+1-2  in an i386 or amd64 chroot.

#931651#35
Date:
2020-06-22 23:25:04 UTC
From:
To:
David Bremner <david@tethera.net> writes:

I can now duplicate this with emacs-nox 1:26.3+1-2  in an i386 or amd64 chroot.