From: Andreas Schwab <schwab@suse.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 23704@debbugs.gnu.org, vincent.belaiche@gmail.com
Subject: bug#23704: 25.1.50; Emacs crash in syntax.c
Date: Mon, 06 Jun 2016 17:03:28 +0200 [thread overview]
Message-ID: <mvmeg8atl4v.fsf@hawking.suse.de> (raw)
In-Reply-To: <83inxmtlmu.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 Jun 2016 17:52:41 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Andreas Schwab <schwab@suse.de>
>> Date: Mon, 06 Jun 2016 09:36:07 +0200
>> Cc: 23704@debbugs.gnu.org
>>
>> > 2233 if (! fastmap[SYNTAX (*p)])
>>
>> I think I have seen a similar crash with the emacs-25 branch as well,
>> but only once, and I couldn't reproduce it so far.
>
> If my reading of the code is correct, we have pointers to buffer text
> and the gap lying around, while invoking code that can GC (which
> compacts buffers). For example, the sequence of calls
>
> SETUP_SYNTAX_TABLE
> -> SETUP_BUFFER_SYNTAX_TABLE
> -> update_syntax_table_forward
> -> parse_sexp_propertize
>
> could call Lisp, and that happens after we already computed the values
> of p, endp, and stop. Likewise the call to UPDATE_SYNTAX_TABLE_FORWARD
> we make inside the loop.
>
> If GC decides to compact the gap, it could well make a previously
> valid pointer invalid.
>
> Could that be the reason?
Yes, that looks very likely.
Andreas.
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
next prev parent reply other threads:[~2016-06-06 15:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-06 5:25 bug#23704: 25.1.50; Emacs crash in syntax.c Vincent Belaïche
2016-06-06 7:36 ` Andreas Schwab
2016-06-06 14:52 ` Eli Zaretskii
2016-06-06 15:03 ` Andreas Schwab [this message]
2016-06-06 14:49 ` Eli Zaretskii
2016-06-06 16:14 ` Vincent Belaïche
2016-06-06 18:45 ` Eli Zaretskii
2016-06-06 17:17 ` Paul Eggert
2016-06-06 18:58 ` Eli Zaretskii
2016-06-06 20:07 ` Paul Eggert
2016-06-07 2:38 ` Eli Zaretskii
2016-06-07 7:26 ` Paul Eggert
2016-06-07 15:52 ` Eli Zaretskii
2016-06-07 16:36 ` Paul Eggert
2016-06-07 17:17 ` Eli Zaretskii
2016-06-07 21:46 ` Vincent Belaïche
2016-06-07 22:11 ` Paul Eggert
2016-06-08 5:34 ` Vincent Belaïche
2016-06-08 16:41 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mvmeg8atl4v.fsf@hawking.suse.de \
--to=schwab@suse.de \
--cc=23704@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=vincent.belaiche@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.