all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: martin rudalics <rudalics@gmx.at>
Cc: 44724@debbugs.gnu.org
Subject: bug#44724: Uninitialised variables in syntax.c cause trouble.
Date: Thu, 19 Nov 2020 16:30:32 +0000	[thread overview]
Message-ID: <20201119163032.GD6259@ACM> (raw)
In-Reply-To: <ce6c38be-1afd-5963-3fab-9585b29d6589@gmx.at>

Hello, Martin.

On Thu, Nov 19, 2020 at 09:25:50 +0100, martin rudalics wrote:
>  >> Just curious: Did current_buffer == find_start_buffer really succeed
>  >> in your scenario?

>  > Yes it did.  All four comparisons in that block of code succeeded,
>  > causing a spurious value to be returned by find_defun_start.

> Isn't the probability for such a thing to be caused by uninitialized
> variables lower than that of the Emacs tagging scheme to fail as a
> whole?

Yes.

>  > But now I think that that value was a previously valid one which just
>  > hadn't been updated on buffer changes.

>  > I don't think there's any cache invalidation code associated with this
>  > cache,

> MODIFF == find_start_modiff

Yes, thanks, I was wrong there.

>  > and I think that's why it gave an invalid result.

I've found out what my problem is.  find_defun_start, unless one takes
precautions against it, calls syntax-ppss, which in my situation was
uninitialised.  There is nothing in Emacs to cause the initialisation of
syntax-ppss when, say, the syntax-table is changed.  It all needs to be
done by hand.

I'll close this bug as not a bug.

Thanks for all the help!

> martin

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2020-11-19 16:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201119163032.GD6259@ACM \
    --to=acm@muc.de \
    --cc=44724@debbugs.gnu.org \
    --cc=rudalics@gmx.at \
    /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.