GNU bug report logs - #60237
30.0.50; tree sitter core dumps when I edebug view a node

Previous Next

Package: emacs;

Reported by: Mickey Petersen <mickey <at> masteringemacs.org>

Date: Wed, 21 Dec 2022 12:30:02 UTC

Severity: normal

Found in version 30.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


Message #50 received at 60237 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, Yuan Fu <casouri <at> gmail.com>, mickey <at> masteringemacs.org,
 60237 <at> debbugs.gnu.org
Subject: Re: bug#60237: 30.0.50; tree sitter core dumps when I edebug view a
 node
Date: Sun, 26 Feb 2023 10:16:25 -0500
> Stefan, could it be a problem for us if garbage-collecting an object
> calls xmalloc?  Including if the "memory" profiler is running at the
> time of that GC?

I can't think of a fundamental reason why this would be a problem, but
as you've seen some code may not be quite ready for it.

I suspect the simplest solution is to do something like what we do
for the cpu-profiler, i.e. handle the "time within GC" specially by
checking (EQ (backtrace_top_function (), QAutomatic_GC)) to determine
that we're within the GC.

We could just not count those xmalloc calls, tho better would be to use
generalize `cpu_gc_count` so it's also used for the mem profiler.


        Stefan


PS: While the mem profiler was originally thought as a poor-man option
in the absence of timers, I've occasionally found it handy to track down
problems where we're spending too much time in the GC.





This bug report was last modified 2 years and 70 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.