From: Alan Mackenzie <acm@muc.de>
To: 44724@debbugs.gnu.org
Subject: bug#44724: Uninitialised variables in syntax.c cause trouble.
Date: Wed, 18 Nov 2020 17:38:34 +0000 [thread overview]
Message-ID: <20201118171726.GA10071@ACM> (raw)
Hello, Emacs.
On the master branch.
In src/syntax.c, there are several uninitialised static variables, one of
which is find_start_value.
It is used in function find_defun_start before being initialised. The
first use is at L.14 of the function, this:
&& pos >= find_start_value
. This has the effect of causing a certain (forward-comment -1) (which
calls back_comment, which calls find_defun_start) to fail.
In my test setup (I am writing tests for syntax.c), find_start_value's
value at loading time was randomly 1270, which was spuriously inside the
comment I was trying to scan backwards over. back_comment thus failed to
recognise the comment, and returned failed.
All these variables need initialising to something if the code in
syntax.c is to work properly.
--
Alan Mackenzie (Nuremberg, Germany).
next reply other threads:[~2020-11-18 17:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 17:38 Alan Mackenzie [this message]
2020-11-18 17:57 ` bug#44724: Uninitialised variables in syntax.c cause trouble martin rudalics
2020-11-18 20:26 ` Alan Mackenzie
2020-11-19 8:25 ` martin rudalics
2020-11-19 16:30 ` Alan Mackenzie
2020-11-24 8:02 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201118171726.GA10071@ACM \
--to=acm@muc.de \
--cc=44724@debbugs.gnu.org \
/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 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).