all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#44724: Uninitialised variables in syntax.c cause trouble.
@ 2020-11-18 17:38 Alan Mackenzie
  2020-11-18 17:57 ` martin rudalics
  0 siblings, 1 reply; 6+ messages in thread
From: Alan Mackenzie @ 2020-11-18 17:38 UTC (permalink / raw)
  To: 44724

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





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

end of thread, other threads:[~2020-11-24  8:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-18 17:38 bug#44724: Uninitialised variables in syntax.c cause trouble Alan Mackenzie
2020-11-18 17:57 ` 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

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.