GNU logs - #78762, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
Resent-From: Zach Shaftel <zach@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Wed, 11 Jun 2025 20:04:01 +0000
Resent-Message-ID: <handler.78762.B.174967222025119 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 78762
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: 78762 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.174967222025119
          (code B ref -1); Wed, 11 Jun 2025 20:04:01 +0000
Received: (at submit) by debbugs.gnu.org; 11 Jun 2025 20:03:40 +0000
Received: from localhost ([127.0.0.1]:51841 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uPRfg-0006X4-4T
	for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 16:03:40 -0400
Received: from lists.gnu.org ([2001:470:142::17]:56112)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2)
 (envelope-from <SRS0=ba03=Y3=shaf.tel=zach@HIDDEN>)
 id 1uPRfd-0006Wp-1J
 for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 16:03:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1)
 (envelope-from <SRS0=ba03=Y3=shaf.tel=zach@HIDDEN>)
 id 1uPRfV-0007bX-G2
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 16:03:30 -0400
Received: from smtp.forwardemail.net ([121.127.44.73])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1)
 (envelope-from <SRS0=ba03=Y3=shaf.tel=zach@HIDDEN>)
 id 1uPRfR-0005Lj-S4
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 16:03:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shaf.tel;
 h=Content-Type: MIME-Version: Message-ID: Date: Subject: To: From;
 q=dns/txt; s=fe-acc5b42812; t=1749672199;
 bh=cq47yB3ruDnE6qu3+MTj426muv/zuldOT2DwQ28JkLM=;
 b=JbM3/FofjjB6R2ONKA73RErk4oEDjW2R8L0Mh4wpxvM0KL7J63gwnmYRHI0mj1UxhgErn3NXk
 rEGX0/DQ0/ckyYE/PtfOLWIIrjBxM2wAEJZvmDmren5nag1la/HCrX5O641EhNGBLtqTk/HBJru
 f7i086GM/jYGKT+oO6JL42Y=
X-Forward-Email-ID: 6849e10475444c2c8fae6b1d
X-Forward-Email-Sender: rfc822; zach@HIDDEN, smtp.forwardemail.net,
 121.127.44.73
X-Forward-Email-Version: 1.0.3
X-Forward-Email-Website: https://forwardemail.net
X-Complaints-To: abuse@HIDDEN
X-Report-Abuse: abuse@HIDDEN
X-Report-Abuse-To: abuse@HIDDEN
From: Zach Shaftel <zach@HIDDEN>
User-Agent: mu4e 1.12.10; emacs 31.0.50
Date: Wed, 11 Jun 2025 16:03:12 -0400
Message-ID: <87v7p2xczj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=121.127.44.73;
 envelope-from=SRS0=ba03=Y3=shaf.tel=zach@HIDDEN;
 helo=smtp.forwardemail.net
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain

Tags: patch

a simple NULL dereference fix. the profiler log would be null if
profiler-*-log is called without a profiler-*-start before it, or if a
previous profiler-*-log call had flushed the log and the profiler wasn't
restarted since then. then export_log would try to read the NULL log and
segfault.

to reproduce the bug:
emacs --batch -f profiler-cpu-log

this patch causes profiler-cpu-log and profiler-memory-log to just
return nil if the log is null.


In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.49, cairo version 1.18.4) of 2025-06-04 built on bigbox
Repository revision: 680fa61b5989b84c0e19ac568be012afd8345f0c
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --with-modules --without-xwidgets --with-native-compilation
 --with-tree-sitter --without-gsettings --without-gconf --without-gpm
 --with-pgtk --without-compress-install 'CFLAGS=-mtune=native
 -march=native -O2 -g -fuse-ld=mold''


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-Fix-segfault-in-profiler-cpu-log-and-profiler-memory.patch

From 2c1b3bc8b020acbef496dd991bd08bc0f5505528 Mon Sep 17 00:00:00 2001
From: Zach Shaftel <zach@HIDDEN>
Date: Wed, 11 Jun 2025 15:37:31 -0400
Subject: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log

* src/profiler.c (export_log): Check if a log has been allocated first,
and return nil if it hasn't.
(Fprofiler_cpu_log, Fprofiler_memory_log): Mention the possibly nil
result.
---
 src/profiler.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/profiler.c b/src/profiler.c
index 12d75012c79..816864e940e 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -534,7 +534,11 @@ DEFUN ("profiler-cpu-log", Fprofiler_cpu_log, Sprofiler_cpu_log,
 The log is a hash-table mapping backtraces to counters which represent
 the amount of time spent at those points.  Every backtrace is a vector
 of functions, where the last few elements may be nil.
-Before returning, a new log is allocated for future samples.  */)
+
+If the profiler has not run since the last invocation of
+`profiler-cpu-log' (or was never run at all), nil is returned.  If the
+profiler is currently running, a new log is allocated for future samples
+before returning.  */)
   (void)
 {
   /* Temporarily stop profiling to avoid it interfering with our data
@@ -556,6 +560,9 @@ DEFUN ("profiler-cpu-log", Fprofiler_cpu_log, Sprofiler_cpu_log,
 static Lisp_Object
 export_log (struct profiler_log *plog)
 {
+  if (plog->log == NULL)
+    /* We haven't collected any new data, so return nil.  */
+    return Qnil;
   log_t *log = plog->log;
   /* The returned hash table uses `equal' as key equivalence predicate
      which is more discriminating than the `function-equal' used by
@@ -639,7 +646,11 @@ DEFUN ("profiler-memory-log",
 The log is a hash-table mapping backtraces to counters which represent
 the amount of memory allocated at those points.  Every backtrace is a vector
 of functions, where the last few elements may be nil.
-Before returning, a new log is allocated for future samples.  */)
+
+If the profiler has not run since the last invocation of
+`profiler-memory-log' (or was never run at all), nil is returned.  If
+the profiler is currently running, a new log is allocated for future
+samples before returning.  */)
   (void)
 {
   bool prof_mem = profiler_memory_running;
-- 
2.49.0


--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Zach Shaftel <zach@HIDDEN>
Subject: bug#78762: Acknowledgement ([PATCH] Fix segfault in
 profiler-cpu-log and profiler-memory-log)
Message-ID: <handler.78762.B.174967222025119.ack <at> debbugs.gnu.org>
References: <87v7p2xczj.fsf@HIDDEN>
X-Gnu-PR-Message: ack 78762
X-Gnu-PR-Package: emacs
X-Gnu-PR-Keywords: patch
Reply-To: 78762 <at> debbugs.gnu.org
Date: Wed, 11 Jun 2025 20:04:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 78762 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
78762: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78762
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Thu, 12 Jun 2025 05:04:01 +0000
Resent-Message-ID: <handler.78762.B78762.174970460910047 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 78762
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Zach Shaftel <zach@HIDDEN>
Cc: 78762 <at> debbugs.gnu.org
Received: via spool by 78762-submit <at> debbugs.gnu.org id=B78762.174970460910047
          (code B ref 78762); Thu, 12 Jun 2025 05:04:01 +0000
Received: (at 78762) by debbugs.gnu.org; 12 Jun 2025 05:03:29 +0000
Received: from localhost ([127.0.0.1]:55061 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uPa64-0002bs-1g
	for submit <at> debbugs.gnu.org; Thu, 12 Jun 2025 01:03:28 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35648)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1uPa61-0002bS-2W
 for 78762 <at> debbugs.gnu.org; Thu, 12 Jun 2025 01:03:25 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1uPa5v-000620-9d; Thu, 12 Jun 2025 01:03:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=fdAVT4dcncrpcDTlUhvGoGmhEk+DL3OBQOLTscmJyJE=; b=G8AYZXcgc7Ej
 0Z9lZvdNloVqTw0uie3a1B4/AWyV8/UG6zwyJGs1PTGesD537g9POnlfVY9W4cdxN0HPsq8FvY+Ie
 AV9aoKlkYBZuHDNXRj1Tks8aBXCFz6h+kjcEg03itMlnT8KgBylDGRDZ0xvqidT4fMdtKbSsmm70Z
 z5FIHXNWDfM0NvXCrA0WKHwathz1kmKJahxfpDkgPQECXHk6LQItjlGICisGSbY59aK9Mk+8dG1zz
 Iy2iWoyiZfoUothZ/uXp4dhMXJKl+zJF7M+OgjXAWs11GwneC37ntfo0Tfwx7Bw0seZIt+jGxyfUs
 fUJ27rmA8+6m3UhHfmVtvg==;
Date: Thu, 12 Jun 2025 08:03:10 +0300
Message-Id: <86ikl1h7qp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <87v7p2xczj.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
References: <87v7p2xczj.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Wed, 11 Jun 2025 16:03:12 -0400
> From:  Zach Shaftel via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> a simple NULL dereference fix. the profiler log would be null if
> profiler-*-log is called without a profiler-*-start before it, or if a
> previous profiler-*-log call had flushed the log and the profiler wasn't
> restarted since then. then export_log would try to read the NULL log and
> segfault.
> 
> to reproduce the bug:
> emacs --batch -f profiler-cpu-log
> 
> this patch causes profiler-cpu-log and profiler-memory-log to just
> return nil if the log is null.

Thanks, please see a few minor comments below.

> >From 2c1b3bc8b020acbef496dd991bd08bc0f5505528 Mon Sep 17 00:00:00 2001
> From: Zach Shaftel <zach@HIDDEN>
> Date: Wed, 11 Jun 2025 15:37:31 -0400
> Subject: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
> 
> * src/profiler.c (export_log): Check if a log has been allocated first,
> and return nil if it hasn't.
> (Fprofiler_cpu_log, Fprofiler_memory_log): Mention the possibly nil
> result.

The last sentence should say "...in the doc string."  Or just "Doc
fix" should be enough, since the nature of the change is clear from
the diffs.

Also, in the next revisions of the patch mention the bug number in the
commit log message, since you now know its number.

> @@ -534,7 +534,11 @@ DEFUN ("profiler-cpu-log", Fprofiler_cpu_log, Sprofiler_cpu_log,
>  The log is a hash-table mapping backtraces to counters which represent
>  the amount of time spent at those points.  Every backtrace is a vector
>  of functions, where the last few elements may be nil.
> -Before returning, a new log is allocated for future samples.  */)
> +
> +If the profiler has not run since the last invocation of
> +`profiler-cpu-log' (or was never run at all), nil is returned.  If the
> +profiler is currently running, a new log is allocated for future samples
> +before returning.  */)

Please avoid passive tense as much as possible.  Here, "return nil"
and "allocate a new log" is shorter and more clear.

> +  if (plog->log == NULL)

We usually prefer the C style:

     if (!plog->log)

> +    /* We haven't collected any new data, so return nil.  */
> +    return Qnil;

No need to add comments that just describe what the code already says.
Comments which explain what the code does should tell something that
isn't clear by just looking at the code.

> @@ -639,7 +646,11 @@ DEFUN ("profiler-memory-log",
>  The log is a hash-table mapping backtraces to counters which represent
>  the amount of memory allocated at those points.  Every backtrace is a vector
>  of functions, where the last few elements may be nil.
> -Before returning, a new log is allocated for future samples.  */)
> +
> +If the profiler has not run since the last invocation of
> +`profiler-memory-log' (or was never run at all), nil is returned.  If
> +the profiler is currently running, a new log is allocated for future
> +samples before returning.  */)

Same comment as above for the other doc string.

Also, can you add a test for this?

Finally, the same problem exists on the emacs-30 release branch, so
could you please post your next revision of the patch relative to the
release branch?




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 12 Jun 2025 05:07:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jun 12 01:07:45 2025
Received: from localhost ([127.0.0.1]:55085 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uPaAD-00030y-81
	for submit <at> debbugs.gnu.org; Thu, 12 Jun 2025 01:07:45 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47988)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>)
 id 1uPaAA-00030P-1o; Thu, 12 Jun 2025 01:07:42 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1uPaA4-0006dh-FM; Thu, 12 Jun 2025 01:07:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=DSkDdp6nKrlwigBZ0J/21ClShcJNq7Y/4YNB9Wr+dAQ=; b=Jc4uvYFIS32G
 vBWElBPV35184CNM4NxA003QHHiS+6DBJQY7JIt+D+wr/icvwYbswYtTIvir9urAB57EXjWKyr8jd
 6aGo7TIaS8BufwuRJc7xZPTar2W/GqidkqZzTintTnvpg+sGmU8MNSMkO7HcIFO/rmCqqj1TOJFiw
 gS7QoBeh4oTaRxZ9qilu8d883lhZDH6ZPqJ39BiDoUP6BHxjT1B3bz0yjUnznK34fGbtZanb/k2eL
 Ss4jVFhY3ynEXsohl73RBk6S7ImqSfcFf/D2KkuW3yu5sPczou7s+DJVBlp3ni+ifQJ/MbADh91lm
 HMI/+mhoEwYCtWGsUyAwpg==;
Date: Thu, 12 Jun 2025 08:07:32 +0300
Message-Id: <86h60lh7jf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Aaron Zeng <azeng@HIDDEN>, Zach Shaftel <zach@HIDDEN>
In-Reply-To: <q7mmsaeq9dj.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#78763: 30.0.50;
 Calling (profiler-cpu-log) segfaults Emacs if profiler is not running
References: <q7mmsaeq9dj.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: control
Cc: app-emacs-dev@HIDDEN, 78763 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

merge 78763 78762
thanks

> Cc: app-emacs-dev@HIDDEN
> Date: Wed, 11 Jun 2025 17:03:04 -0400
> From:  Aaron Zeng via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> As of commit 22201dde773e5404f80baa1f59768e88d97a322a, calling
> (profiler-cpu-log) while the CPU profiler is not running causes Emacs to
> crash with a segfault.  I have confirmed this issue also appears at
> f69b822fb0e804a13ff7a4eb55fc2ae618e0de72, which was the tip of the
> master branch at the time of writing.
> 
> To reproduce, simply run:
> $ emacs -Q --batch --eval '(profiler-cpu-log)'
> 
> The gdb backtrace is attached to this email.

Thanks, this is the same problem as in bug#78762, so I've merged them.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
Resent-From: zach shaftel <zach@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 13 Jun 2025 02:12:04 +0000
Resent-Message-ID: <handler.78762.B78762.174978071611148 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 78762
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Eli Zaretskii <eliz@HIDDEN>
Cc: 78762 <at> debbugs.gnu.org
Received: via spool by 78762-submit <at> debbugs.gnu.org id=B78762.174978071611148
          (code B ref 78762); Fri, 13 Jun 2025 02:12:04 +0000
Received: (at 78762) by debbugs.gnu.org; 13 Jun 2025 02:11:56 +0000
Received: from localhost ([127.0.0.1]:34004 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uPttZ-0002tK-GW
	for submit <at> debbugs.gnu.org; Thu, 12 Jun 2025 22:11:56 -0400
Received: from smtp.forwardemail.net ([149.28.215.223]:20691)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2)
 (envelope-from <SRS0=47db=Y4=shaf.tel=zach@HIDDEN>)
 id 1uPttU-0002rJ-56
 for 78762 <at> debbugs.gnu.org; Thu, 12 Jun 2025 22:11:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shaf.tel;
 h=Content-Type: MIME-Version: Message-ID: Date: References: In-Reply-To:
 Subject: Cc: To: From; q=dns/txt; s=fe-acc5b42812; t=1749780704;
 bh=32xxm1LI8qEy9MxST7SIgefSTqMD8ABdsWeYCSRjxeI=;
 b=EFDVfIORO/70j5P0LM5ZPJo+gGEqZ/XaRHB6ZTrMCo/7k/1fUmYx9qWT+UZU7vsSXZvytSTgH
 PTRM4Qn0ydYgB6yB+vU88+TdTRRG68mNSJZNo++fr26/irqo6GafBxUyk9GK+c2X2hGNwJV6asV
 uYk4xKJfNwaeTAm9dwi3oaM=
X-Forward-Email-ID: 684b88dce8fc3b2af7a2b941
X-Forward-Email-Sender: rfc822; zach@HIDDEN, smtp.forwardemail.net,
 149.28.215.223
X-Forward-Email-Version: 1.0.3
X-Forward-Email-Website: https://forwardemail.net
X-Complaints-To: abuse@HIDDEN
X-Report-Abuse: abuse@HIDDEN
X-Report-Abuse-To: abuse@HIDDEN
From: zach shaftel <zach@HIDDEN>
In-Reply-To: <86ikl1h7qp.fsf@HIDDEN>
References: <87v7p2xczj.fsf@HIDDEN> <86ikl1h7qp.fsf@HIDDEN>
User-Agent: mu4e 1.12.10; emacs 31.0.50
Date: Thu, 12 Jun 2025 22:11:36 -0400
Message-ID: <87zfecpezr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

thank you for the feedback, a new patch is attached. let me know if i
missed anything.

- zach


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-Fix-segfault-in-profiler-cpu-log-and-profiler-memory.patch

From b90a79d7b9845cf39a124648cc860bd7f48d858d Mon Sep 17 00:00:00 2001
From: Zach Shaftel <zach@HIDDEN>
Date: Wed, 11 Jun 2025 15:37:31 -0400
Subject: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
 (bug#78763)

* src/profiler.c (export_log): Check if a log has been allocated first,
and return nil if it hasn't.
(Fprofiler_cpu_log, Fprofiler_memory_log): Doc fix.
* test/src/profiler-tests.el (profiler-tests-cpu-profiler)
(profiler-tests-memory-profiler): New tests.
---
 src/profiler.c             | 13 +++++++--
 test/src/profiler-tests.el | 58 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 69 insertions(+), 2 deletions(-)
 create mode 100644 test/src/profiler-tests.el

diff --git a/src/profiler.c b/src/profiler.c
index 4c88f676fbd..f3a8db69f78 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -534,7 +534,11 @@ DEFUN ("profiler-cpu-log", Fprofiler_cpu_log, Sprofiler_cpu_log,
 The log is a hash-table mapping backtraces to counters which represent
 the amount of time spent at those points.  Every backtrace is a vector
 of functions, where the last few elements may be nil.
-Before returning, a new log is allocated for future samples.  */)
+
+If the profiler has not run since the last invocation of
+`profiler-cpu-log' (or was never run at all), return nil.  If the
+profiler is currently running, allocate a new log for future samples
+before returning.  */)
   (void)
 {
   /* Temporarily stop profiling to avoid it interfering with our data
@@ -556,6 +560,7 @@ DEFUN ("profiler-cpu-log", Fprofiler_cpu_log, Sprofiler_cpu_log,
 static Lisp_Object
 export_log (struct profiler_log *plog)
 {
+  if (!plog->log) return Qnil;
   log_t *log = plog->log;
   /* The returned hash table uses `equal' as key equivalence predicate
      which is more discriminating than the `function-equal' used by
@@ -639,7 +644,11 @@ DEFUN ("profiler-memory-log",
 The log is a hash-table mapping backtraces to counters which represent
 the amount of memory allocated at those points.  Every backtrace is a vector
 of functions, where the last few elements may be nil.
-Before returning, a new log is allocated for future samples.  */)
+
+If the profiler has not run since the last invocation of
+`profiler-memory-log' (or was never run at all), return nil.  If the
+profiler is currently running, allocate a new log for future samples
+before returning.  */)
   (void)
 {
   bool prof_mem = profiler_memory_running;
diff --git a/test/src/profiler-tests.el b/test/src/profiler-tests.el
new file mode 100644
index 00000000000..fe50de713e2
--- /dev/null
+++ b/test/src/profiler-tests.el
@@ -0,0 +1,58 @@
+;;; profiler-tests.el --- tests for src/profiler.c  -*- lexical-binding:t -*-
+
+;; Copyright (C) 2025 Free Software Foundation, Inc.
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;;; Code:
+
+(require 'ert)
+
+(ert-deftest profiler-tests-memory-profiler ()
+  (let ((was-running (profiler-memory-running-p)))
+    ;; do this first in case the profiler was already running
+    (should (eq was-running (profiler-memory-stop)))
+    (profiler-memory-start)
+    (should-error (profiler-memory-start))
+    (should (profiler-memory-running-p))
+    (should (hash-table-p (profiler-memory-log)))
+    ;; `profiler-memory-log' shouldn't terminate profiling.
+    (should (profiler-memory-running-p))
+    (profiler-memory-stop)
+    (profiler-memory-log)               ;flush the log
+    (should-not (profiler-memory-log))
+    (when was-running (profiler-memory-start))))
+
+(defconst profiler-tests-cpu-sampling-interval 1000000)
+
+(ert-deftest profiler-tests-cpu-profiler ()
+  (skip-unless (fboundp 'profiler-cpu-start))
+  (let ((was-running (profiler-cpu-running-p)))
+    (should (eq was-running (profiler-cpu-stop)))
+    (profiler-cpu-start profiler-tests-cpu-sampling-interval)
+    (should-error (profiler-cpu-start profiler-tests-cpu-sampling-interval))
+    (should (hash-table-p (profiler-cpu-log)))
+    (should (profiler-cpu-running-p))
+    (profiler-cpu-stop)
+    (profiler-cpu-log)
+    (should-not (profiler-cpu-log))
+    (when was-running
+      (profiler-cpu-start (or (bound-and-true-p profiler-sampling-interval)
+                              profiler-tests-cpu-sampling-interval)))))
+
+;;; profiler-tests.el ends here
-- 
2.49.0


--=-=-=--




Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Eli Zaretskii <eliz@HIDDEN>
Subject: bug#78762: closed ([PATCH] Fix segfault in profiler-cpu-log and
 profiler-memory-log)
CC: tracker <at> debbugs.gnu.org
Message-ID: <handler.78762.D78762.17499130304321.ackdone <at> debbugs.gnu.org>
References: <86v7oyqslh.fsf@HIDDEN> <87v7p2xczj.fsf@HIDDEN>
X-Gnu-PR-Message: closed 78762
X-Gnu-PR-Package: emacs
X-Gnu-PR-Keywords: patch
Date: Sat, 14 Jun 2025 14:58:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1749913082-4528-0"

This is a multi-part message in MIME format...

------------=_1749913082-4528-0
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8

Your message dated Sat, 14 Jun 2025 17:56:58 +0300
with message-id <86v7oyqslh.fsf@HIDDEN>
and subject line Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log an=
d profiler-memory-log
has caused the debbugs.gnu.org bug report #78762,
regarding [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@HIDDEN)


--=20
78762: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78762
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1749913082-4528-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 11 Jun 2025 20:03:40 +0000
Received: from localhost ([127.0.0.1]:51841 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uPRfg-0006X4-4T
	for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 16:03:40 -0400
Received: from lists.gnu.org ([2001:470:142::17]:56112)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2)
 (envelope-from <SRS0=ba03=Y3=shaf.tel=zach@HIDDEN>)
 id 1uPRfd-0006Wp-1J
 for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 16:03:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1)
 (envelope-from <SRS0=ba03=Y3=shaf.tel=zach@HIDDEN>)
 id 1uPRfV-0007bX-G2
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 16:03:30 -0400
Received: from smtp.forwardemail.net ([121.127.44.73])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1)
 (envelope-from <SRS0=ba03=Y3=shaf.tel=zach@HIDDEN>)
 id 1uPRfR-0005Lj-S4
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 16:03:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shaf.tel;
 h=Content-Type: MIME-Version: Message-ID: Date: Subject: To: From;
 q=dns/txt; s=fe-acc5b42812; t=1749672199;
 bh=cq47yB3ruDnE6qu3+MTj426muv/zuldOT2DwQ28JkLM=;
 b=JbM3/FofjjB6R2ONKA73RErk4oEDjW2R8L0Mh4wpxvM0KL7J63gwnmYRHI0mj1UxhgErn3NXk
 rEGX0/DQ0/ckyYE/PtfOLWIIrjBxM2wAEJZvmDmren5nag1la/HCrX5O641EhNGBLtqTk/HBJru
 f7i086GM/jYGKT+oO6JL42Y=
X-Forward-Email-ID: 6849e10475444c2c8fae6b1d
X-Forward-Email-Sender: rfc822; zach@HIDDEN, smtp.forwardemail.net,
 121.127.44.73
X-Forward-Email-Version: 1.0.3
X-Forward-Email-Website: https://forwardemail.net
X-Complaints-To: abuse@HIDDEN
X-Report-Abuse: abuse@HIDDEN
X-Report-Abuse-To: abuse@HIDDEN
From: Zach Shaftel <zach@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
User-Agent: mu4e 1.12.10; emacs 31.0.50
X-Debbugs-Cc: 
Date: Wed, 11 Jun 2025 16:03:12 -0400
Message-ID: <87v7p2xczj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=121.127.44.73;
 envelope-from=SRS0=ba03=Y3=shaf.tel=zach@HIDDEN;
 helo=smtp.forwardemail.net
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain

Tags: patch

a simple NULL dereference fix. the profiler log would be null if
profiler-*-log is called without a profiler-*-start before it, or if a
previous profiler-*-log call had flushed the log and the profiler wasn't
restarted since then. then export_log would try to read the NULL log and
segfault.

to reproduce the bug:
emacs --batch -f profiler-cpu-log

this patch causes profiler-cpu-log and profiler-memory-log to just
return nil if the log is null.


In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.49, cairo version 1.18.4) of 2025-06-04 built on bigbox
Repository revision: 680fa61b5989b84c0e19ac568be012afd8345f0c
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --with-modules --without-xwidgets --with-native-compilation
 --with-tree-sitter --without-gsettings --without-gconf --without-gpm
 --with-pgtk --without-compress-install 'CFLAGS=-mtune=native
 -march=native -O2 -g -fuse-ld=mold''


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-Fix-segfault-in-profiler-cpu-log-and-profiler-memory.patch

From 2c1b3bc8b020acbef496dd991bd08bc0f5505528 Mon Sep 17 00:00:00 2001
From: Zach Shaftel <zach@HIDDEN>
Date: Wed, 11 Jun 2025 15:37:31 -0400
Subject: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log

* src/profiler.c (export_log): Check if a log has been allocated first,
and return nil if it hasn't.
(Fprofiler_cpu_log, Fprofiler_memory_log): Mention the possibly nil
result.
---
 src/profiler.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/profiler.c b/src/profiler.c
index 12d75012c79..816864e940e 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -534,7 +534,11 @@ DEFUN ("profiler-cpu-log", Fprofiler_cpu_log, Sprofiler_cpu_log,
 The log is a hash-table mapping backtraces to counters which represent
 the amount of time spent at those points.  Every backtrace is a vector
 of functions, where the last few elements may be nil.
-Before returning, a new log is allocated for future samples.  */)
+
+If the profiler has not run since the last invocation of
+`profiler-cpu-log' (or was never run at all), nil is returned.  If the
+profiler is currently running, a new log is allocated for future samples
+before returning.  */)
   (void)
 {
   /* Temporarily stop profiling to avoid it interfering with our data
@@ -556,6 +560,9 @@ DEFUN ("profiler-cpu-log", Fprofiler_cpu_log, Sprofiler_cpu_log,
 static Lisp_Object
 export_log (struct profiler_log *plog)
 {
+  if (plog->log == NULL)
+    /* We haven't collected any new data, so return nil.  */
+    return Qnil;
   log_t *log = plog->log;
   /* The returned hash table uses `equal' as key equivalence predicate
      which is more discriminating than the `function-equal' used by
@@ -639,7 +646,11 @@ DEFUN ("profiler-memory-log",
 The log is a hash-table mapping backtraces to counters which represent
 the amount of memory allocated at those points.  Every backtrace is a vector
 of functions, where the last few elements may be nil.
-Before returning, a new log is allocated for future samples.  */)
+
+If the profiler has not run since the last invocation of
+`profiler-memory-log' (or was never run at all), nil is returned.  If
+the profiler is currently running, a new log is allocated for future
+samples before returning.  */)
   (void)
 {
   bool prof_mem = profiler_memory_running;
-- 
2.49.0


--=-=-=--



------------=_1749913082-4528-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 78762-done) by debbugs.gnu.org; 14 Jun 2025 14:57:10 +0000
Received: from localhost ([127.0.0.1]:40225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uQSJg-00017b-K1
	for submit <at> debbugs.gnu.org; Sat, 14 Jun 2025 10:57:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47690)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1uQSJc-000168-KY
 for 78762-done <at> debbugs.gnu.org; Sat, 14 Jun 2025 10:57:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1uQSJW-0002re-UX; Sat, 14 Jun 2025 10:56:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=GN9eDE7gq6iS/1mXOTgU2gAGnYP2B/SU+2JqhVc3fdQ=; b=DcL6Tkd4CY0g
 phFCBP0vL1jTnDBE6SCLRVHVocyT1vISGJv2SavsDxbUx49HGlYjkY8W5FGOTIrXEGGc6NEAq7r96
 DewJ6JY77Kn9hON8b4cly7R9ewnDHt24PTqa29cxdLTJmtsumxZCBO3k4YQLldvHJGooJ+N1rWTNN
 uLrp760Ki5Srw21WaFO2xDJjtKST4tFU9LzbYysm7VCGrmFFZZiLLxKp3qlprRcCiK7gCMkzH5+G1
 upb0i6ML5vTWgtlYxi59w1VrVyc5ZGJGlTVOp0YzJzydH74h4uz215UuVNLxKZUTN9miWKOp0fsXM
 QP7UGy52pJtoU45qEdi76Q==;
Date: Sat, 14 Jun 2025 17:56:58 +0300
Message-Id: <86v7oyqslh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: zach shaftel <zach@HIDDEN>
In-Reply-To: <87zfecpezr.fsf@HIDDEN> (message from zach shaftel on Thu, 12
 Jun 2025 22:11:36 -0400)
Subject: Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and
 profiler-memory-log
References: <87v7p2xczj.fsf@HIDDEN> <86ikl1h7qp.fsf@HIDDEN>
 <87zfecpezr.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 78762-done
Cc: 78762-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: zach shaftel <zach@HIDDEN>
> Cc: 78762 <at> debbugs.gnu.org
> Date: Thu, 12 Jun 2025 22:11:36 -0400
> 
> thank you for the feedback, a new patch is attached. let me know if i
> missed anything.

Thanks, installed on master, and closing the bug.


------------=_1749913082-4528-0--


Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Zach Shaftel <zach@HIDDEN>
Subject: bug#78762: closed (Re: bug#78762: [PATCH] Fix segfault in
 profiler-cpu-log and profiler-memory-log)
Message-ID: <handler.78762.D78762.17499130304321.notifdone <at> debbugs.gnu.org>
References: <86v7oyqslh.fsf@HIDDEN> <87v7p2xczj.fsf@HIDDEN>
X-Gnu-PR-Message: they-closed 78762
X-Gnu-PR-Package: emacs
X-Gnu-PR-Keywords: patch
Reply-To: 78762 <at> debbugs.gnu.org
Date: Sat, 14 Jun 2025 14:58:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1749913082-4528-1"

This is a multi-part message in MIME format...

------------=_1749913082-4528-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Your bug report

#78762: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 78762 <at> debbugs.gnu.org.

--=20
78762: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78762
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1749913082-4528-1
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 78762-done) by debbugs.gnu.org; 14 Jun 2025 14:57:10 +0000
Received: from localhost ([127.0.0.1]:40225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uQSJg-00017b-K1
	for submit <at> debbugs.gnu.org; Sat, 14 Jun 2025 10:57:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47690)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1uQSJc-000168-KY
 for 78762-done <at> debbugs.gnu.org; Sat, 14 Jun 2025 10:57:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1uQSJW-0002re-UX; Sat, 14 Jun 2025 10:56:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=GN9eDE7gq6iS/1mXOTgU2gAGnYP2B/SU+2JqhVc3fdQ=; b=DcL6Tkd4CY0g
 phFCBP0vL1jTnDBE6SCLRVHVocyT1vISGJv2SavsDxbUx49HGlYjkY8W5FGOTIrXEGGc6NEAq7r96
 DewJ6JY77Kn9hON8b4cly7R9ewnDHt24PTqa29cxdLTJmtsumxZCBO3k4YQLldvHJGooJ+N1rWTNN
 uLrp760Ki5Srw21WaFO2xDJjtKST4tFU9LzbYysm7VCGrmFFZZiLLxKp3qlprRcCiK7gCMkzH5+G1
 upb0i6ML5vTWgtlYxi59w1VrVyc5ZGJGlTVOp0YzJzydH74h4uz215UuVNLxKZUTN9miWKOp0fsXM
 QP7UGy52pJtoU45qEdi76Q==;
Date: Sat, 14 Jun 2025 17:56:58 +0300
Message-Id: <86v7oyqslh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: zach shaftel <zach@HIDDEN>
In-Reply-To: <87zfecpezr.fsf@HIDDEN> (message from zach shaftel on Thu, 12
 Jun 2025 22:11:36 -0400)
Subject: Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and
 profiler-memory-log
References: <87v7p2xczj.fsf@HIDDEN> <86ikl1h7qp.fsf@HIDDEN>
 <87zfecpezr.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 78762-done
Cc: 78762-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: zach shaftel <zach@HIDDEN>
> Cc: 78762 <at> debbugs.gnu.org
> Date: Thu, 12 Jun 2025 22:11:36 -0400
> 
> thank you for the feedback, a new patch is attached. let me know if i
> missed anything.

Thanks, installed on master, and closing the bug.


------------=_1749913082-4528-1
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 11 Jun 2025 20:03:40 +0000
Received: from localhost ([127.0.0.1]:51841 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uPRfg-0006X4-4T
	for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 16:03:40 -0400
Received: from lists.gnu.org ([2001:470:142::17]:56112)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2)
 (envelope-from <SRS0=ba03=Y3=shaf.tel=zach@HIDDEN>)
 id 1uPRfd-0006Wp-1J
 for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 16:03:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1)
 (envelope-from <SRS0=ba03=Y3=shaf.tel=zach@HIDDEN>)
 id 1uPRfV-0007bX-G2
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 16:03:30 -0400
Received: from smtp.forwardemail.net ([121.127.44.73])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1)
 (envelope-from <SRS0=ba03=Y3=shaf.tel=zach@HIDDEN>)
 id 1uPRfR-0005Lj-S4
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 16:03:28 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shaf.tel;
 h=Content-Type: MIME-Version: Message-ID: Date: Subject: To: From;
 q=dns/txt; s=fe-acc5b42812; t=1749672199;
 bh=cq47yB3ruDnE6qu3+MTj426muv/zuldOT2DwQ28JkLM=;
 b=JbM3/FofjjB6R2ONKA73RErk4oEDjW2R8L0Mh4wpxvM0KL7J63gwnmYRHI0mj1UxhgErn3NXk
 rEGX0/DQ0/ckyYE/PtfOLWIIrjBxM2wAEJZvmDmren5nag1la/HCrX5O641EhNGBLtqTk/HBJru
 f7i086GM/jYGKT+oO6JL42Y=
X-Forward-Email-ID: 6849e10475444c2c8fae6b1d
X-Forward-Email-Sender: rfc822; zach@HIDDEN, smtp.forwardemail.net,
 121.127.44.73
X-Forward-Email-Version: 1.0.3
X-Forward-Email-Website: https://forwardemail.net
X-Complaints-To: abuse@HIDDEN
X-Report-Abuse: abuse@HIDDEN
X-Report-Abuse-To: abuse@HIDDEN
From: Zach Shaftel <zach@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
User-Agent: mu4e 1.12.10; emacs 31.0.50
X-Debbugs-Cc: 
Date: Wed, 11 Jun 2025 16:03:12 -0400
Message-ID: <87v7p2xczj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=121.127.44.73;
 envelope-from=SRS0=ba03=Y3=shaf.tel=zach@HIDDEN;
 helo=smtp.forwardemail.net
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain

Tags: patch

a simple NULL dereference fix. the profiler log would be null if
profiler-*-log is called without a profiler-*-start before it, or if a
previous profiler-*-log call had flushed the log and the profiler wasn't
restarted since then. then export_log would try to read the NULL log and
segfault.

to reproduce the bug:
emacs --batch -f profiler-cpu-log

this patch causes profiler-cpu-log and profiler-memory-log to just
return nil if the log is null.


In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.49, cairo version 1.18.4) of 2025-06-04 built on bigbox
Repository revision: 680fa61b5989b84c0e19ac568be012afd8345f0c
Repository branch: master
System Description: Arch Linux

Configured using:
 'configure --with-modules --without-xwidgets --with-native-compilation
 --with-tree-sitter --without-gsettings --without-gconf --without-gpm
 --with-pgtk --without-compress-install 'CFLAGS=-mtune=native
 -march=native -O2 -g -fuse-ld=mold''


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-Fix-segfault-in-profiler-cpu-log-and-profiler-memory.patch

From 2c1b3bc8b020acbef496dd991bd08bc0f5505528 Mon Sep 17 00:00:00 2001
From: Zach Shaftel <zach@HIDDEN>
Date: Wed, 11 Jun 2025 15:37:31 -0400
Subject: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log

* src/profiler.c (export_log): Check if a log has been allocated first,
and return nil if it hasn't.
(Fprofiler_cpu_log, Fprofiler_memory_log): Mention the possibly nil
result.
---
 src/profiler.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/profiler.c b/src/profiler.c
index 12d75012c79..816864e940e 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -534,7 +534,11 @@ DEFUN ("profiler-cpu-log", Fprofiler_cpu_log, Sprofiler_cpu_log,
 The log is a hash-table mapping backtraces to counters which represent
 the amount of time spent at those points.  Every backtrace is a vector
 of functions, where the last few elements may be nil.
-Before returning, a new log is allocated for future samples.  */)
+
+If the profiler has not run since the last invocation of
+`profiler-cpu-log' (or was never run at all), nil is returned.  If the
+profiler is currently running, a new log is allocated for future samples
+before returning.  */)
   (void)
 {
   /* Temporarily stop profiling to avoid it interfering with our data
@@ -556,6 +560,9 @@ DEFUN ("profiler-cpu-log", Fprofiler_cpu_log, Sprofiler_cpu_log,
 static Lisp_Object
 export_log (struct profiler_log *plog)
 {
+  if (plog->log == NULL)
+    /* We haven't collected any new data, so return nil.  */
+    return Qnil;
   log_t *log = plog->log;
   /* The returned hash table uses `equal' as key equivalence predicate
      which is more discriminating than the `function-equal' used by
@@ -639,7 +646,11 @@ DEFUN ("profiler-memory-log",
 The log is a hash-table mapping backtraces to counters which represent
 the amount of memory allocated at those points.  Every backtrace is a vector
 of functions, where the last few elements may be nil.
-Before returning, a new log is allocated for future samples.  */)
+
+If the profiler has not run since the last invocation of
+`profiler-memory-log' (or was never run at all), nil is returned.  If
+the profiler is currently running, a new log is allocated for future
+samples before returning.  */)
   (void)
 {
   bool prof_mem = profiler_memory_running;
-- 
2.49.0


--=-=-=--



------------=_1749913082-4528-1--


Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Eli Zaretskii <eliz@HIDDEN>
Subject: bug#78763: closed (30.0.50; Calling (profiler-cpu-log) segfaults
 Emacs if profiler is not running)
CC: tracker <at> debbugs.gnu.org
Message-ID: <handler.78763.D78762.17499130304321.ackdone <at> debbugs.gnu.org>
References: <86v7oyqslh.fsf@HIDDEN> <q7mmsaeq9dj.fsf@HIDDEN>
X-Gnu-PR-Message: closed 78763
X-Gnu-PR-Package: emacs
X-Gnu-PR-Keywords: patch
Date: Sat, 14 Jun 2025 14:58:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1749913082-4528-2"

This is a multi-part message in MIME format...

------------=_1749913082-4528-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=utf-8

Your message dated Sat, 14 Jun 2025 17:56:58 +0300
with message-id <86v7oyqslh.fsf@HIDDEN>
and subject line Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log an=
d profiler-memory-log
has caused the debbugs.gnu.org bug report #78762,
regarding 30.0.50; Calling (profiler-cpu-log) segfaults Emacs if profiler i=
s not running
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@HIDDEN)


--=20
78762: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78762
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1749913082-4528-2
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 11 Jun 2025 21:03:20 +0000
Received: from localhost ([127.0.0.1]:52289 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uPSbP-0002td-25
	for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 17:03:20 -0400
Received: from lists.gnu.org ([2001:470:142::17]:50356)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <azeng@HIDDEN>)
 id 1uPSbL-0002so-5H
 for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 17:03:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <azeng@HIDDEN>)
 id 1uPSbF-0003el-0I
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 17:03:09 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <azeng@HIDDEN>)
 id 1uPSbC-0003Aj-B5
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 17:03:08 -0400
From: Aaron Zeng <azeng@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; Calling (profiler-cpu-log) segfaults Emacs if profiler is
 not running
X-Debbugs-Cc: 
Date: Wed, 11 Jun 2025 17:03:04 -0400
Message-ID: <q7mmsaeq9dj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1749675784;
 bh=BaNq72njth9i85tg4kWjGnciywWFtu30j453SjbCFjw=;
 h=From:To:Cc:Subject:Date;
 b=qtYWpTQajyvyGznGO05DZoL6/0YVnISE2Y0wrv2b5jYVaZypt/MY6VWmaGDe+fNh8
 gw93AiFs0lS3od5Rn13qWKbi7nyOBU1jqkB8qwS5okCUM/QAIw+NjEi/X65H5aRef8
 bynQX/kWtpELZaVIkBwxMULS/R1q0L/HQbziRpyYCTSYOLzsLo9NfkFAD4GJsWw4Bx
 8/xKdqhFeUdjfAz5A1knTG/iu2GLnq9ZPeyOVUafh3wmv/kPP8kTMjxCiiEupy3vH2
 yGXz/PoFX0TXux/6wUQ9/b8/cuHd8ohDHC8kDt55eHOv/kj9IIVTXKtnu0PQi5lRnH
 Ubx/XWNpcxF7A==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=azeng@HIDDEN;
 helo=mxout5.mail.janestreet.com
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
Cc: app-emacs-dev@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain


As of commit 22201dde773e5404f80baa1f59768e88d97a322a, calling
(profiler-cpu-log) while the CPU profiler is not running causes Emacs to
crash with a segfault.  I have confirmed this issue also appears at
f69b822fb0e804a13ff7a4eb55fc2ae618e0de72, which was the tip of the
master branch at the time of writing.

To reproduce, simply run:
$ emacs -Q --batch --eval '(profiler-cpu-log)'

The gdb backtrace is attached to this email.

--=-=-=
Content-Type: text/plain
Content-Disposition: attachment; filename=backtrace.txt
Content-Transfer-Encoding: quoted-printable

$ gdb -x src/.gdbinit --args ~/src/emacs/trunk/src/emacs -Q --batch --eval =
'(profiler-cpu-log)'
GNU gdb (GDB) Rocky Linux 8.2-20.el8.0.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm=
l>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/azeng/src/emacs/trunk/src/emacs...done.
Warning: /usr/local/home/azeng/src/emacs/trunk/../lwlib: No such file or di=
rectory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from te=
rminal]
Environment variable "DISPLAY" not defined.
TERM =3D xterm-256color
Breakpoint 1 at 0x53ef35: file emacs.c, line 441.
Breakpoint 2 at 0x503bd7: file xterm.c, line 26965.
(gdb) r
Starting program: /usr/local/home/azeng/src/emacs/trunk/src/emacs -Q --batc=
h --eval \(profiler-cpu-log\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffd43ff700 (LWP 1537182)]

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x0000000000657910 in export_log (plog=3Dplog@entry=3D0xc45980 <cpu>) at pr=
ofiler.c:570
570       for (int i =3D 0; i < log->size; i++)
Missing separate debuginfos, use: yum debuginfo-install alsa-lib-1.2.10-2.e=
l8.x86_64 bzip2-libs-1.0.6-28.el8_10.x86_64 cairo-1.15.12-6.el8.x86_64 dbus=
-libs-1.12.8-26.el8.jane1.x86_64 expat-2.2.5-17.el8_10.x86_64 fontconfig-2.=
13.1-4.el8.x86_64 freetype-2.9.1-10.el8_10.x86_64 fribidi-1.0.4-9.el8.x86_6=
4 gdk-pixbuf2-2.36.12-6.el8_10.x86_64 glib2-2.66.1-3.el8.jane1.x86_64 glibc=
-2.28-251.el8_10.16.jane1.x86_64 gmp-6.1.2-12.el8.x86_64 gnutls-3.6.16-8.el=
8_10.3.x86_64 graphite2-1.3.10-10.el8.x86_64 harfbuzz-1.7.5-4.el8.x86_64 ja=
nsson-2.14-1.el8.x86_64 jbigkit-libs-2.1-14.el8.x86_64 libICE-1.0.9-15.el8.=
x86_64 libSM-1.2.3-1.el8.x86_64 libX11-1.6.8-9.el8_10.x86_64 libX11-xcb-1.6=
.8-9.el8_10.x86_64 libXaw-1.0.13-10.el8.x86_64 libXcomposite-0.4.4-14.el8.x=
86_64 libXext-1.3.4-1.el8.x86_64 libXfixes-5.0.3-7.el8.x86_64 libXinerama-1=
.1.4-1.el8.x86_64 libXmu-1.1.3-1.el8.x86_64 libXpm-3.5.12-11.el8.x86_64 lib=
Xrandr-1.5.2-1.el8.x86_64 libXrender-0.9.10-7.el8.x86_64 libXt-1.1.5-12.el8=
.x86_64 libattr-2.4.48-3.el8.x86_64 libblkid-2.32.1-46.el8.x86_64 libcap-2.=
70-4.el8.jane1.x86_64 libcroco-0.6.12-4.el8_2.1.x86_64 libdatrie-0.2.9-7.el=
8.x86_64 libffi-3.1-24.el8.x86_64 libgcc-8.5.0-26.el8_10.x86_64 libgccjit-8=
.5.0-27.el8.x86_64 libgcrypt-1.8.5-7.el8_6.x86_64 libjpeg-turbo-1.5.3-14.el=
8_10.x86_64 libmount-2.32.1-46.el8.x86_64 libmpc-1.1.0-9.1.el8.x86_64 libpn=
g-1.6.34-5.el8.x86_64 libselinux-2.9-10.el8_10.x86_64 libtiff-4.0.9-34.el8_=
10.x86_64 libtree-sitter-0.20.7-1.el8.x86_64 libuuid-2.32.1-46.el8.x86_64 l=
ibxcb-1.13.1-1.el8.x86_64 libxml2-2.9.7-19.el8_10.x86_64 mpfr-3.1.6-1.el8.x=
86_64 nettle-3.4.1-7.el8.x86_64 nss_db-2.28-251.el8_10.16.jane1.x86_64 pang=
o-1.42.4-8.el8.x86_64 pcre-8.42-6.el8.x86_64 pixman-0.38.4-4.el8.x86_64 sql=
ite-libs-3.36.0-3.el8.jane1.x86_64 systemd-libs-239-82.el8_10.5.jane1.x86_6=
4 zlib-1.2.11-26.el8.x86_64
(gdb) bt full
#0  0x0000000000657910 in export_log (plog=3Dplog@entry=3D0xc45980 <cpu>) a=
t profiler.c:570
        i =3D 0
        log =3D 0x0
        h =3D XIL(0xd6fea5)
#1  0x0000000000657a14 in Fprofiler_cpu_log () at profiler.c:548
        prof_cpu =3D false
        ret =3D <optimized out>
#2  0x00000000005d541d in eval_sub (form=3Dform@entry=3DXIL(0x7ffff73cab43)=
) at lisp.h:2210
        i =3D 0
        maxargs =3D 0
        args_left =3D XIL(0)
        numargs =3D 0
        original_fun =3D <optimized out>
        original_args =3D XIL(0)
        fun =3D XIL(0xba3d25)
        val =3D <optimized out>
        funcar =3D <optimized out>
        argvals =3D {XIL(0xcf1180), XIL(0x1), XIL(0xcf1180), XIL(0x19), XIL=
(0x7fffffffcc50), make_fixnum(1522323), XIL(0x7fffffffcc50), XIL(0xc23970)}
#3  0x00000000005d8039 in Feval (form=3DXIL(0x7ffff73cab43), lexical=3D<opt=
imized out>) at eval.c:2389
#4  0x00000000005d38b1 in funcall_subr (subr=3D0xb9aae0 <Seval>, numargs=3D=
numargs@entry=3D2, args=3Dargs@entry=3D0x7fffd4bff1c0) at eval.c:3092
        argbuf =3D {XIL(0xd30fa4), XIL(0), XIL(0), make_fixnum(1546292), XI=
L(0x7fffffffcd00), XIL(0x5e4750), XIL(0x7fffe2370270), XIL(0x7fffe28b7ce5)}
        a =3D <optimized out>
        maxargs =3D 2
        fun =3D <optimized out>
#5  0x000000000061a397 in exec_byte_code (fun=3D<optimized out>, fun@entry=
=3DXIL(0x7fffe23478dd), args_template=3D<optimized out>, args_template@entr=
y=3D0, nargs=3D<optimized out>,=20
    nargs@entry=3D0, args=3D<optimized out>, args@entry=3D0x7fffffffce60) a=
t lisp.h:2210
        call_nargs =3D 2
        call_fun =3D <optimized out>
        template =3D <optimized out>
        val =3D <optimized out>
        call_args =3D 0x7fffd4bff1c0
        original_fun =3D XIL(0x6c60)
        op =3D 2
        type =3D <optimized out>
        targets =3D=20
          {0x61c461 <exec_byte_code+11234>, 0x61c479 <exec_byte_code+11258>=
, 0x61c4ab <exec_byte_code+11308>, 0x61c4ad <exec_byte_code+11310>, 0x61c4a=
f <exec_byte_code+11312>, 0x61c479 <exec_byte_code+11258>, 0x61c4b1 <exec_b=
yte_code+11314>, 0x61c4e8 <exec_byte_code+11369>, 0x619a45 <exec_byte_code+=
454>, 0x619a8e <exec_byte_code+527>, 0x619a90 <exec_byte_code+529>, 0x619a9=
2 <exec_byte_code+531>, 0x619a94 <exec_byte_code+533>, 0x619a45 <exec_byte_=
code+454>, 0x619a96 <exec_byte_code+535>, 0x619a2e <exec_byte_code+431>, 0x=
619e00 <exec_byte_code+1409>, 0x619e5f <exec_byte_code+1504>, 0x619e61 <exe=
c_byte_code+1506>, 0x619e63 <exec_byte_code+1508>, 0x619e65 <exec_byte_code=
+1510>, 0x619e00 <exec_byte_code+1409>, 0x619e7e <exec_byte_code+1535>, 0x6=
19e67 <exec_byte_code+1512>, 0x619f98 <exec_byte_code+1817>, 0x619fd8 <exec=
_byte_code+1881>, 0x619fda <exec_byte_code+1883>, 0x619fdc <exec_byte_code+=
1885>, 0x619fde <exec_byte_code+1887>, 0x619f98 <exec_byte_code+1817>, 0x61=
9f75 <exec_byte_code+1782>, 0x619f81 <exec_byte_code+1794>, 0x61a003 <exec_=
byte_code+1924>, 0x61a15c <exec_byte_code+2269>, 0x61a161 <exec_byte_code+2=
274>, 0x61a166 <exec_byte_code+2279>, 0x61a16b <exec_byte_code+2284>, 0x61a=
003 <exec_byte_code+1924>, 0x619fe0 <exec_byte_code+1889>, 0x619fec <exec_b=
yte_code+1901>, 0x61a3d3 <exec_byte_code+2900>, 0x61a41d <exec_byte_code+29=
74>, 0x61a41f <exec_byte_code+2976>, 0x61a421 <exec_byte_code+2978>, 0x61a4=
23 <exec_byte_code+2980>, 0x61a3d3 <exec_byte_code+2900>, 0x61a3b0 <exec_by=
te_code+2865>, 0x61a3bc <exec_byte_code+2877>, 0x61a88f <exec_byte_code+411=
2>, 0x61a82e <exec_byte_code+4015>, 0x61a7c5 <exec_byte_code+3910>, 0x61c46=
1 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_b=
yte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+=
11234>, 0x61a9e8 <exec_byte_code+4457>, 0x61aaba <exec_byte_code+4667>, 0x6=
1ab51 <exec_byte_code+4818>, 0x61ab93 <exec_byte_code+4884>, 0x61abdb <exec=
_byte_code+4956>, 0x619bde <exec_byte_code+863>, 0x619d71 <exec_byte_code+1=
266>, 0x61ac23 <exec_byte_code+5028>, 0x619b86 <exec_byte_code+775>, 0x619d=
a8 <exec_byte_code+1321>, 0x61ac5a <exec_byte_code+5083>, 0x61ac91 <exec_by=
te_code+5138>, 0x61acba <exec_byte_code+5179>, 0x61acf1 <exec_byte_code+523=
4>, 0x61ad27 <exec_byte_code+5288>, 0x61ada7 <exec_byte_code+5416>, 0x61add=
0 <exec_byte_code+5457>, 0x61aef2 <exec_byte_code+5747>, 0x61b016 <exec_byt=
e_code+6039>, 0x61b03f <exec_byte_code+6080>, 0x61b068 <exec_byte_code+6121=
>, 0x61b09f <exec_byte_code+6176>, 0x61b0d6 <exec_byte_code+6231>, 0x61b10d=
 <exec_byte_code+6286>, 0x61b14a <exec_byte_code+6347>, 0x61b17d <exec_byte=
_code+6398>, 0x61b1b0 <exec_byte_code+6449>, 0x61b229 <exec_byte_code+6570>=
, 0x61b27d <exec_byte_code+6654>, 0x61b2d1 <exec_byte_code+6738>, 0x61b339 =
<exec_byte_code+6842>, 0x61b3a9 <exec_byte_code+6954>, 0x61b419 <exec_byte_=
code+7066>, 0x61b489 <exec_byte_code+7178>, 0x61b4f9 <exec_byte_code+7290>,=
 0x61b580 <exec_byte_code+7425>, 0x61b5de <exec_byte_code+7519>, 0x61b665 <=
exec_byte_code+7654>, 0x61b6cd <exec_byte_code+7758>, 0x61b735 <exec_byt--T=
ype <RET> for more, q to quit, c to continue without paging--c
e_code+7862>, 0x61b8cd <exec_byte_code+8270>, 0x61a6d4 <exec_byte_code+3669=
>, 0x61b910 <exec_byte_code+8337>, 0x61b939 <exec_byte_code+8378>, 0x61b9ad=
 <exec_byte_code+8494>, 0x61b9f0 <exec_byte_code+8561>, 0x61ba33 <exec_byte=
_code+8628>, 0x61ba5c <exec_byte_code+8669>, 0x61ba87 <exec_byte_code+8712>=
, 0x61bab2 <exec_byte_code+8755>, 0x61bae5 <exec_byte_code+8806>, 0x61c461 =
<exec_byte_code+11234>, 0x61bb13 <exec_byte_code+8852>, 0x61bb3e <exec_byte=
_code+8895>, 0x61bb69 <exec_byte_code+8938>, 0x61bb94 <exec_byte_code+8981>=
, 0x61bbbf <exec_byte_code+9024>, 0x61bbea <exec_byte_code+9067>, 0x61a6d4 =
<exec_byte_code+3669>, 0x61c461 <exec_byte_code+11234>, 0x61bc13 <exec_byte=
_code+9108>, 0x61bc4f <exec_byte_code+9168>, 0x61bc78 <exec_byte_code+9209>=
, 0x61bca1 <exec_byte_code+9250>, 0x61bcd8 <exec_byte_code+9305>, 0x61bd0f =
<exec_byte_code+9360>, 0x61bd38 <exec_byte_code+9401>, 0x61bd61 <exec_byte_=
code+9442>, 0x61bd98 <exec_byte_code+9497>, 0x61bdcf <exec_byte_code+9552>,=
 0x61be06 <exec_byte_code+9607>, 0x61be31 <exec_byte_code+9650>, 0x61c461 <=
exec_byte_code+11234>, 0x61a674 <exec_byte_code+3573>, 0x61a425 <exec_byte_=
code+2982>, 0x619b40 <exec_byte_code+705>, 0x61a4bc <exec_byte_code+3133>, =
0x61a4fe <exec_byte_code+3199>, 0x61a540 <exec_byte_code+3265>, 0x61a586 <e=
xec_byte_code+3335>, 0x61a655 <exec_byte_code+3542>, 0x619f4c <exec_byte_co=
de+1741>, 0x61a6b5 <exec_byte_code+3638>, 0x61a700 <exec_byte_code+3713>, 0=
x61a75d <exec_byte_code+3806>, 0x61a789 <exec_byte_code+3850>, 0x61a8bc <ex=
ec_byte_code+4157>, 0x61a908 <exec_byte_code+4233>, 0x61a945 <exec_byte_cod=
e+4294>, 0x61a98e <exec_byte_code+4367>, 0x61c461 <exec_byte_code+11234>, 0=
x61be5a <exec_byte_code+9691>, 0x61be97 <exec_byte_code+9752>, 0x61bec0 <ex=
ec_byte_code+9793>, 0x61bee9 <exec_byte_code+9834>, 0x61bf12 <exec_byte_cod=
e+9875>, 0x61bf3b <exec_byte_code+9916>, 0x61bf72 <exec_byte_code+9971>, 0x=
61bfa9 <exec_byte_code+10026>, 0x61bfe0 <exec_byte_code+10081>, 0x61c017 <e=
xec_byte_code+10136>, 0x61c0f4 <exec_byte_code+10357>, 0x61c12b <exec_byte_=
code+10412>, 0x61c162 <exec_byte_code+10467>, 0x61c18b <exec_byte_code+1050=
8>, 0x61c207 <exec_byte_code+10632>, 0x61c287 <exec_byte_code+10760>, 0x61c=
2c2 <exec_byte_code+10819>, 0x61c2fd <exec_byte_code+10878>, 0x61b7d4 <exec=
_byte_code+8021>, 0x61b862 <exec_byte_code+8163>, 0x61c330 <exec_byte_code+=
10929>, 0x61c3d6 <exec_byte_code+11095>, 0x61c461 <exec_byte_code+11234>, 0=
x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <=
exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte=
_code+11234>, 0x61ad61 <exec_byte_code+5346>, 0x61b1e3 <exec_byte_code+6500=
>, 0x61b967 <exec_byte_code+8424>, 0x61c52a <exec_byte_code+11435>, 0x61c56=
c <exec_byte_code+11501>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_b=
yte_code+11234>, 0x61c5bb <exec_byte_code+11580>, 0x61c605 <exec_byte_code+=
11654>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0=
x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <=
exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte=
_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c7ec <exec_byte_code+121=
41> <repeats 64 times>}
        quitcounter =3D 25 '\031'
        bc =3D 0xb82df0 <main_thread+496>
        top =3D 0x7fffd4bff1b8
        pc =3D 0x7fffe28b7d41 "\266\005\202z\003\315\350\351\016C\"\003\206=
}\001\n\211A\022\242\211\262\r\315\324\003\003\003\334$\266\203\203\225\001=
\006\n\331\315O\262\v\210\334\352\353\006\f!!\262\v\211\203\267\001\316\016=
D\006\fC\"\026D\006\t\203\331\001\016D\262\n\210\202z\003\006\t\203\317\001=
\006\t\006\v\006\vAB\241\210\006\tA\262\n\210\202z\003\006\n\016DB\211\026D=
\262\n\210\202z\003\353\002\206\347\001\n\211A\022\242!\354\352\002!!\355\0=
01!\203\366\001\211\262\002\356\002\315\334#\266\003\202z\003\353\002\206\n=
\002\n\211A\022\242!\352\001!\354\001!\357\001!\203\032\002\211\262\002\016=
A\360\232\203)\002\361\002!\266\004\202z\003\362\002!\266\004\202z\003"...
        vector =3D <optimized out>
        maxdepth =3D <optimized out>
        const_length =3D <optimized out>
        bytestr_length =3D <optimized out>
        vectorp =3D 0x7fffe2359f58
        max_stack =3D <optimized out>
        frame_base =3D <optimized out>
        fp =3D <optimized out>
        bytestr_data =3D 0x7fffe28b7bd8 "\306 \210\b\203\034"
        rest =3D <optimized out>
        mandatory =3D <optimized out>
        nonrest =3D <optimized out>
        pushedargs =3D <optimized out>
        result =3D <optimized out>
#6  0x00000000005d2d4a in fetch_and_exec_byte_code (fun=3Dfun@entry=3DXIL(0=
x7fffe23478dd), args_template=3Dargs_template@entry=3D0, nargs=3Dnargs@entr=
y=3D0, args=3Dargs@entry=3D0x7fffffffce60) at eval.c:3135
#7  0x00000000005d5e2d in funcall_lambda (fun=3Dfun@entry=3DXIL(0x7fffe2347=
8dd), nargs=3Dnargs@entry=3D0, arg_vector=3Darg_vector@entry=3D0x7fffffffce=
60) at lisp.h:1298
        val =3D <optimized out>
        syms_left =3D make_fixnum(0)
        next =3D <optimized out>
        lexenv =3D <optimized out>
        i =3D <optimized out>
        optional =3D <optimized out>
        rest =3D <optimized out>
        previous_rest =3D <optimized out>
#8  0x00000000005d70d4 in apply_lambda (fun=3Dfun@entry=3DXIL(0x7fffe23478d=
d), args=3D<optimized out>, count=3Dcount@entry=3D...) at eval.c:3157
        arg_vector =3D 0x7fffffffce60
        tem =3D <optimized out>
        sa_avail =3D <optimized out>
        numargs =3D 0
        args_left =3D XIL(0)
#9  0x00000000005d5649 in eval_sub (form=3Dform@entry=3DXIL(0x7fffe27e4cf3)=
) at eval.c:2572
        original_fun =3D XIL(0x7fffe172de68)
        original_args =3D XIL(0)
        fun =3D XIL(0x7fffe23478dd)
        val =3D <optimized out>
        funcar =3D <optimized out>
        argvals =3D {XIL(0xcf1080), XIL(0x1), XIL(0xcf1080), XIL(0), XIL(0x=
7fffffffcf40), make_fixnum(1522323), XIL(0x7fffffffcf40), XIL(0xc23970)}
#10 0x00000000005d8039 in Feval (form=3DXIL(0x7fffe27e4cf3), lexical=3Dlexi=
cal@entry=3DXIL(0x30)) at eval.c:2389
#11 0x0000000000540f5f in top_level_2 () at lisp.h:1179
        setup_handler =3D true
        res =3D <optimized out>
#12 0x00000000005cfeb5 in internal_condition_case (bfun=3Dbfun@entry=3D0x54=
0f3c <top_level_2>, handlers=3Dhandlers@entry=3DXIL(0x90), hfun=3Dhfun@entr=
y=3D0x547d22 <cmd_error>) at eval.c:1537
        val =3D <optimized out>
        c =3D 0xd40910
#13 0x0000000000540e98 in top_level_1 (ignore=3Dignore@entry=3DXIL(0)) at l=
isp.h:1179
#14 0x00000000005cfdfc in internal_catch (tag=3Dtag@entry=3DXIL(0x10830), f=
unc=3Dfunc@entry=3D0x540e76 <top_level_1>, arg=3Darg@entry=3DXIL(0)) at eva=
l.c:1217
        val =3D <optimized out>
        c =3D 0xd35ec0
#15 0x0000000000540e15 in command_loop () at lisp.h:1179
#16 0x0000000000547893 in recursive_edit_1 () at keyboard.c:744
        val =3D <optimized out>
#17 0x0000000000547c51 in Frecursive_edit () at keyboard.c:827
        buffer =3D <optimized out>
#18 0x0000000000540211 in main (argc=3D5, argv=3D0x7fffffffd208) at emacs.c=
:2624
        stack_bottom_variable =3D 0x6a046d <__libc_csu_init+77>
        old_argc =3D <optimized out>
        no_loadup =3D false
        junk =3D 0x0
        dname_arg =3D 0x0
        ch_to_dir =3D 0x0
        original_pwd =3D 0x0
        dump_mode =3D <optimized out>
        skip_args =3D 1
        temacs =3D 0x0
        attempt_load_pdump =3D <optimized out>
        only_version =3D false
        rlim =3D {
          rlim_cur =3D 10022912,=20
          rlim_max =3D 18446744073709551615
        }
        lc_all =3D <optimized out>
        sockfd =3D -1
        module_assertions =3D <optimized out>

Lisp Backtrace:
"profiler-cpu-log" (0xffffcc00)
"eval" (0xd4bff1c0)
"command-line-1" (0xd4bff0b8)
"command-line" (0xd4bff040)
"normal-top-level" (0xffffce60)
(gdb) xbacktrace
"profiler-cpu-log" (0xffffcc00)
"eval" (0xd4bff1c0)
"command-line-1" (0xd4bff0b8)
"command-line" (0xd4bff040)
"normal-top-level" (0xffffce60)

--=-=-=
Content-Type: text/plain


In GNU Emacs 30.0.50 (build 7, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2025-06-11 built on
 igm-qws-u12685a
Repository revision: 22201dde773e5404f80baa1f59768e88d97a322a
Repository branch: HEAD
System Description: Rocky Linux 8.10 (Green Obsidian)

Configured using:
 'configure --config-cache --with-x-toolkit=lucid --without-gpm
 --without-gconf --without-selinux --without-imagemagick --with-modules
 --with-gif=no --with-cairo --with-rsvg --without-compress-install
 --with-tree-sitter --with-native-compilation=aot --prefix=
 'CFLAGS=-ggdb3 -Og -fno-omit-frame-pointer' LDFLAGS=-ggdb3'

Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11
XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util time-date subr-x mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
compile text-property-search comint ansi-osc ansi-color ring comp-run
comp-common rx term/xterm xterm byte-opt gv bytecomp byte-compile rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 108023 11051) (symbols 48 6804 0) (strings 32 28851 2118)
 (string-bytes 1 959502) (vectors 16 17388)
 (vector-slots 8 258214 11288) (floats 8 38 51) (intervals 56 297 3)
 (buffers 984 11))

--=-=-=--



------------=_1749913082-4528-2
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 78762-done) by debbugs.gnu.org; 14 Jun 2025 14:57:10 +0000
Received: from localhost ([127.0.0.1]:40225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uQSJg-00017b-K1
	for submit <at> debbugs.gnu.org; Sat, 14 Jun 2025 10:57:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47690)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1uQSJc-000168-KY
 for 78762-done <at> debbugs.gnu.org; Sat, 14 Jun 2025 10:57:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1uQSJW-0002re-UX; Sat, 14 Jun 2025 10:56:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=GN9eDE7gq6iS/1mXOTgU2gAGnYP2B/SU+2JqhVc3fdQ=; b=DcL6Tkd4CY0g
 phFCBP0vL1jTnDBE6SCLRVHVocyT1vISGJv2SavsDxbUx49HGlYjkY8W5FGOTIrXEGGc6NEAq7r96
 DewJ6JY77Kn9hON8b4cly7R9ewnDHt24PTqa29cxdLTJmtsumxZCBO3k4YQLldvHJGooJ+N1rWTNN
 uLrp760Ki5Srw21WaFO2xDJjtKST4tFU9LzbYysm7VCGrmFFZZiLLxKp3qlprRcCiK7gCMkzH5+G1
 upb0i6ML5vTWgtlYxi59w1VrVyc5ZGJGlTVOp0YzJzydH74h4uz215UuVNLxKZUTN9miWKOp0fsXM
 QP7UGy52pJtoU45qEdi76Q==;
Date: Sat, 14 Jun 2025 17:56:58 +0300
Message-Id: <86v7oyqslh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: zach shaftel <zach@HIDDEN>
In-Reply-To: <87zfecpezr.fsf@HIDDEN> (message from zach shaftel on Thu, 12
 Jun 2025 22:11:36 -0400)
Subject: Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and
 profiler-memory-log
References: <87v7p2xczj.fsf@HIDDEN> <86ikl1h7qp.fsf@HIDDEN>
 <87zfecpezr.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 78762-done
Cc: 78762-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: zach shaftel <zach@HIDDEN>
> Cc: 78762 <at> debbugs.gnu.org
> Date: Thu, 12 Jun 2025 22:11:36 -0400
> 
> thank you for the feedback, a new patch is attached. let me know if i
> missed anything.

Thanks, installed on master, and closing the bug.


------------=_1749913082-4528-2--


Message sent:


MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Aaron Zeng <azeng@HIDDEN>
Subject: bug#78763: closed (Re: bug#78762: [PATCH] Fix segfault in
 profiler-cpu-log and profiler-memory-log)
Message-ID: <handler.78763.D78762.17499130304321.notifdone <at> debbugs.gnu.org>
References: <86v7oyqslh.fsf@HIDDEN> <q7mmsaeq9dj.fsf@HIDDEN>
X-Gnu-PR-Message: they-closed 78763
X-Gnu-PR-Package: emacs
X-Gnu-PR-Keywords: patch
Reply-To: 78763 <at> debbugs.gnu.org
Date: Sat, 14 Jun 2025 14:58:02 +0000
Content-Type: multipart/mixed; boundary="----------=_1749913082-4528-3"

This is a multi-part message in MIME format...

------------=_1749913082-4528-3
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Your bug report

#78762: 30.0.50; Calling (profiler-cpu-log) segfaults Emacs if profiler is =
not running

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 78763 <at> debbugs.gnu.org.

--=20
78762: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D78762
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems

------------=_1749913082-4528-3
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 78762-done) by debbugs.gnu.org; 14 Jun 2025 14:57:10 +0000
Received: from localhost ([127.0.0.1]:40225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uQSJg-00017b-K1
	for submit <at> debbugs.gnu.org; Sat, 14 Jun 2025 10:57:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47690)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1uQSJc-000168-KY
 for 78762-done <at> debbugs.gnu.org; Sat, 14 Jun 2025 10:57:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1uQSJW-0002re-UX; Sat, 14 Jun 2025 10:56:58 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=GN9eDE7gq6iS/1mXOTgU2gAGnYP2B/SU+2JqhVc3fdQ=; b=DcL6Tkd4CY0g
 phFCBP0vL1jTnDBE6SCLRVHVocyT1vISGJv2SavsDxbUx49HGlYjkY8W5FGOTIrXEGGc6NEAq7r96
 DewJ6JY77Kn9hON8b4cly7R9ewnDHt24PTqa29cxdLTJmtsumxZCBO3k4YQLldvHJGooJ+N1rWTNN
 uLrp760Ki5Srw21WaFO2xDJjtKST4tFU9LzbYysm7VCGrmFFZZiLLxKp3qlprRcCiK7gCMkzH5+G1
 upb0i6ML5vTWgtlYxi59w1VrVyc5ZGJGlTVOp0YzJzydH74h4uz215UuVNLxKZUTN9miWKOp0fsXM
 QP7UGy52pJtoU45qEdi76Q==;
Date: Sat, 14 Jun 2025 17:56:58 +0300
Message-Id: <86v7oyqslh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: zach shaftel <zach@HIDDEN>
In-Reply-To: <87zfecpezr.fsf@HIDDEN> (message from zach shaftel on Thu, 12
 Jun 2025 22:11:36 -0400)
Subject: Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and
 profiler-memory-log
References: <87v7p2xczj.fsf@HIDDEN> <86ikl1h7qp.fsf@HIDDEN>
 <87zfecpezr.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 78762-done
Cc: 78762-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: zach shaftel <zach@HIDDEN>
> Cc: 78762 <at> debbugs.gnu.org
> Date: Thu, 12 Jun 2025 22:11:36 -0400
> 
> thank you for the feedback, a new patch is attached. let me know if i
> missed anything.

Thanks, installed on master, and closing the bug.


------------=_1749913082-4528-3
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by debbugs.gnu.org; 11 Jun 2025 21:03:20 +0000
Received: from localhost ([127.0.0.1]:52289 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uPSbP-0002td-25
	for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 17:03:20 -0400
Received: from lists.gnu.org ([2001:470:142::17]:50356)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <azeng@HIDDEN>)
 id 1uPSbL-0002so-5H
 for submit <at> debbugs.gnu.org; Wed, 11 Jun 2025 17:03:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <azeng@HIDDEN>)
 id 1uPSbF-0003el-0I
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 17:03:09 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <azeng@HIDDEN>)
 id 1uPSbC-0003Aj-B5
 for bug-gnu-emacs@HIDDEN; Wed, 11 Jun 2025 17:03:08 -0400
From: Aaron Zeng <azeng@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.50; Calling (profiler-cpu-log) segfaults Emacs if profiler is
 not running
X-Debbugs-Cc: 
Date: Wed, 11 Jun 2025 17:03:04 -0400
Message-ID: <q7mmsaeq9dj.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1749675784;
 bh=BaNq72njth9i85tg4kWjGnciywWFtu30j453SjbCFjw=;
 h=From:To:Cc:Subject:Date;
 b=qtYWpTQajyvyGznGO05DZoL6/0YVnISE2Y0wrv2b5jYVaZypt/MY6VWmaGDe+fNh8
 gw93AiFs0lS3od5Rn13qWKbi7nyOBU1jqkB8qwS5okCUM/QAIw+NjEi/X65H5aRef8
 bynQX/kWtpELZaVIkBwxMULS/R1q0L/HQbziRpyYCTSYOLzsLo9NfkFAD4GJsWw4Bx
 8/xKdqhFeUdjfAz5A1knTG/iu2GLnq9ZPeyOVUafh3wmv/kPP8kTMjxCiiEupy3vH2
 yGXz/PoFX0TXux/6wUQ9/b8/cuHd8ohDHC8kDt55eHOv/kj9IIVTXKtnu0PQi5lRnH
 Ubx/XWNpcxF7A==
Received-SPF: pass client-ip=64.215.233.18; envelope-from=azeng@HIDDEN;
 helo=mxout5.mail.janestreet.com
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
Cc: app-emacs-dev@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

--=-=-=
Content-Type: text/plain


As of commit 22201dde773e5404f80baa1f59768e88d97a322a, calling
(profiler-cpu-log) while the CPU profiler is not running causes Emacs to
crash with a segfault.  I have confirmed this issue also appears at
f69b822fb0e804a13ff7a4eb55fc2ae618e0de72, which was the tip of the
master branch at the time of writing.

To reproduce, simply run:
$ emacs -Q --batch --eval '(profiler-cpu-log)'

The gdb backtrace is attached to this email.

--=-=-=
Content-Type: text/plain
Content-Disposition: attachment; filename=backtrace.txt
Content-Transfer-Encoding: quoted-printable

$ gdb -x src/.gdbinit --args ~/src/emacs/trunk/src/emacs -Q --batch --eval =
'(profiler-cpu-log)'
GNU gdb (GDB) Rocky Linux 8.2-20.el8.0.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.htm=
l>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/azeng/src/emacs/trunk/src/emacs...done.
Warning: /usr/local/home/azeng/src/emacs/trunk/../lwlib: No such file or di=
rectory.
SIGINT is used by the debugger.
Are you sure you want to change it? (y or n) [answered Y; input not from te=
rminal]
Environment variable "DISPLAY" not defined.
TERM =3D xterm-256color
Breakpoint 1 at 0x53ef35: file emacs.c, line 441.
Breakpoint 2 at 0x503bd7: file xterm.c, line 26965.
(gdb) r
Starting program: /usr/local/home/azeng/src/emacs/trunk/src/emacs -Q --batc=
h --eval \(profiler-cpu-log\)
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffd43ff700 (LWP 1537182)]

Thread 1 "emacs" received signal SIGSEGV, Segmentation fault.
0x0000000000657910 in export_log (plog=3Dplog@entry=3D0xc45980 <cpu>) at pr=
ofiler.c:570
570       for (int i =3D 0; i < log->size; i++)
Missing separate debuginfos, use: yum debuginfo-install alsa-lib-1.2.10-2.e=
l8.x86_64 bzip2-libs-1.0.6-28.el8_10.x86_64 cairo-1.15.12-6.el8.x86_64 dbus=
-libs-1.12.8-26.el8.jane1.x86_64 expat-2.2.5-17.el8_10.x86_64 fontconfig-2.=
13.1-4.el8.x86_64 freetype-2.9.1-10.el8_10.x86_64 fribidi-1.0.4-9.el8.x86_6=
4 gdk-pixbuf2-2.36.12-6.el8_10.x86_64 glib2-2.66.1-3.el8.jane1.x86_64 glibc=
-2.28-251.el8_10.16.jane1.x86_64 gmp-6.1.2-12.el8.x86_64 gnutls-3.6.16-8.el=
8_10.3.x86_64 graphite2-1.3.10-10.el8.x86_64 harfbuzz-1.7.5-4.el8.x86_64 ja=
nsson-2.14-1.el8.x86_64 jbigkit-libs-2.1-14.el8.x86_64 libICE-1.0.9-15.el8.=
x86_64 libSM-1.2.3-1.el8.x86_64 libX11-1.6.8-9.el8_10.x86_64 libX11-xcb-1.6=
.8-9.el8_10.x86_64 libXaw-1.0.13-10.el8.x86_64 libXcomposite-0.4.4-14.el8.x=
86_64 libXext-1.3.4-1.el8.x86_64 libXfixes-5.0.3-7.el8.x86_64 libXinerama-1=
.1.4-1.el8.x86_64 libXmu-1.1.3-1.el8.x86_64 libXpm-3.5.12-11.el8.x86_64 lib=
Xrandr-1.5.2-1.el8.x86_64 libXrender-0.9.10-7.el8.x86_64 libXt-1.1.5-12.el8=
.x86_64 libattr-2.4.48-3.el8.x86_64 libblkid-2.32.1-46.el8.x86_64 libcap-2.=
70-4.el8.jane1.x86_64 libcroco-0.6.12-4.el8_2.1.x86_64 libdatrie-0.2.9-7.el=
8.x86_64 libffi-3.1-24.el8.x86_64 libgcc-8.5.0-26.el8_10.x86_64 libgccjit-8=
.5.0-27.el8.x86_64 libgcrypt-1.8.5-7.el8_6.x86_64 libjpeg-turbo-1.5.3-14.el=
8_10.x86_64 libmount-2.32.1-46.el8.x86_64 libmpc-1.1.0-9.1.el8.x86_64 libpn=
g-1.6.34-5.el8.x86_64 libselinux-2.9-10.el8_10.x86_64 libtiff-4.0.9-34.el8_=
10.x86_64 libtree-sitter-0.20.7-1.el8.x86_64 libuuid-2.32.1-46.el8.x86_64 l=
ibxcb-1.13.1-1.el8.x86_64 libxml2-2.9.7-19.el8_10.x86_64 mpfr-3.1.6-1.el8.x=
86_64 nettle-3.4.1-7.el8.x86_64 nss_db-2.28-251.el8_10.16.jane1.x86_64 pang=
o-1.42.4-8.el8.x86_64 pcre-8.42-6.el8.x86_64 pixman-0.38.4-4.el8.x86_64 sql=
ite-libs-3.36.0-3.el8.jane1.x86_64 systemd-libs-239-82.el8_10.5.jane1.x86_6=
4 zlib-1.2.11-26.el8.x86_64
(gdb) bt full
#0  0x0000000000657910 in export_log (plog=3Dplog@entry=3D0xc45980 <cpu>) a=
t profiler.c:570
        i =3D 0
        log =3D 0x0
        h =3D XIL(0xd6fea5)
#1  0x0000000000657a14 in Fprofiler_cpu_log () at profiler.c:548
        prof_cpu =3D false
        ret =3D <optimized out>
#2  0x00000000005d541d in eval_sub (form=3Dform@entry=3DXIL(0x7ffff73cab43)=
) at lisp.h:2210
        i =3D 0
        maxargs =3D 0
        args_left =3D XIL(0)
        numargs =3D 0
        original_fun =3D <optimized out>
        original_args =3D XIL(0)
        fun =3D XIL(0xba3d25)
        val =3D <optimized out>
        funcar =3D <optimized out>
        argvals =3D {XIL(0xcf1180), XIL(0x1), XIL(0xcf1180), XIL(0x19), XIL=
(0x7fffffffcc50), make_fixnum(1522323), XIL(0x7fffffffcc50), XIL(0xc23970)}
#3  0x00000000005d8039 in Feval (form=3DXIL(0x7ffff73cab43), lexical=3D<opt=
imized out>) at eval.c:2389
#4  0x00000000005d38b1 in funcall_subr (subr=3D0xb9aae0 <Seval>, numargs=3D=
numargs@entry=3D2, args=3Dargs@entry=3D0x7fffd4bff1c0) at eval.c:3092
        argbuf =3D {XIL(0xd30fa4), XIL(0), XIL(0), make_fixnum(1546292), XI=
L(0x7fffffffcd00), XIL(0x5e4750), XIL(0x7fffe2370270), XIL(0x7fffe28b7ce5)}
        a =3D <optimized out>
        maxargs =3D 2
        fun =3D <optimized out>
#5  0x000000000061a397 in exec_byte_code (fun=3D<optimized out>, fun@entry=
=3DXIL(0x7fffe23478dd), args_template=3D<optimized out>, args_template@entr=
y=3D0, nargs=3D<optimized out>,=20
    nargs@entry=3D0, args=3D<optimized out>, args@entry=3D0x7fffffffce60) a=
t lisp.h:2210
        call_nargs =3D 2
        call_fun =3D <optimized out>
        template =3D <optimized out>
        val =3D <optimized out>
        call_args =3D 0x7fffd4bff1c0
        original_fun =3D XIL(0x6c60)
        op =3D 2
        type =3D <optimized out>
        targets =3D=20
          {0x61c461 <exec_byte_code+11234>, 0x61c479 <exec_byte_code+11258>=
, 0x61c4ab <exec_byte_code+11308>, 0x61c4ad <exec_byte_code+11310>, 0x61c4a=
f <exec_byte_code+11312>, 0x61c479 <exec_byte_code+11258>, 0x61c4b1 <exec_b=
yte_code+11314>, 0x61c4e8 <exec_byte_code+11369>, 0x619a45 <exec_byte_code+=
454>, 0x619a8e <exec_byte_code+527>, 0x619a90 <exec_byte_code+529>, 0x619a9=
2 <exec_byte_code+531>, 0x619a94 <exec_byte_code+533>, 0x619a45 <exec_byte_=
code+454>, 0x619a96 <exec_byte_code+535>, 0x619a2e <exec_byte_code+431>, 0x=
619e00 <exec_byte_code+1409>, 0x619e5f <exec_byte_code+1504>, 0x619e61 <exe=
c_byte_code+1506>, 0x619e63 <exec_byte_code+1508>, 0x619e65 <exec_byte_code=
+1510>, 0x619e00 <exec_byte_code+1409>, 0x619e7e <exec_byte_code+1535>, 0x6=
19e67 <exec_byte_code+1512>, 0x619f98 <exec_byte_code+1817>, 0x619fd8 <exec=
_byte_code+1881>, 0x619fda <exec_byte_code+1883>, 0x619fdc <exec_byte_code+=
1885>, 0x619fde <exec_byte_code+1887>, 0x619f98 <exec_byte_code+1817>, 0x61=
9f75 <exec_byte_code+1782>, 0x619f81 <exec_byte_code+1794>, 0x61a003 <exec_=
byte_code+1924>, 0x61a15c <exec_byte_code+2269>, 0x61a161 <exec_byte_code+2=
274>, 0x61a166 <exec_byte_code+2279>, 0x61a16b <exec_byte_code+2284>, 0x61a=
003 <exec_byte_code+1924>, 0x619fe0 <exec_byte_code+1889>, 0x619fec <exec_b=
yte_code+1901>, 0x61a3d3 <exec_byte_code+2900>, 0x61a41d <exec_byte_code+29=
74>, 0x61a41f <exec_byte_code+2976>, 0x61a421 <exec_byte_code+2978>, 0x61a4=
23 <exec_byte_code+2980>, 0x61a3d3 <exec_byte_code+2900>, 0x61a3b0 <exec_by=
te_code+2865>, 0x61a3bc <exec_byte_code+2877>, 0x61a88f <exec_byte_code+411=
2>, 0x61a82e <exec_byte_code+4015>, 0x61a7c5 <exec_byte_code+3910>, 0x61c46=
1 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_b=
yte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+=
11234>, 0x61a9e8 <exec_byte_code+4457>, 0x61aaba <exec_byte_code+4667>, 0x6=
1ab51 <exec_byte_code+4818>, 0x61ab93 <exec_byte_code+4884>, 0x61abdb <exec=
_byte_code+4956>, 0x619bde <exec_byte_code+863>, 0x619d71 <exec_byte_code+1=
266>, 0x61ac23 <exec_byte_code+5028>, 0x619b86 <exec_byte_code+775>, 0x619d=
a8 <exec_byte_code+1321>, 0x61ac5a <exec_byte_code+5083>, 0x61ac91 <exec_by=
te_code+5138>, 0x61acba <exec_byte_code+5179>, 0x61acf1 <exec_byte_code+523=
4>, 0x61ad27 <exec_byte_code+5288>, 0x61ada7 <exec_byte_code+5416>, 0x61add=
0 <exec_byte_code+5457>, 0x61aef2 <exec_byte_code+5747>, 0x61b016 <exec_byt=
e_code+6039>, 0x61b03f <exec_byte_code+6080>, 0x61b068 <exec_byte_code+6121=
>, 0x61b09f <exec_byte_code+6176>, 0x61b0d6 <exec_byte_code+6231>, 0x61b10d=
 <exec_byte_code+6286>, 0x61b14a <exec_byte_code+6347>, 0x61b17d <exec_byte=
_code+6398>, 0x61b1b0 <exec_byte_code+6449>, 0x61b229 <exec_byte_code+6570>=
, 0x61b27d <exec_byte_code+6654>, 0x61b2d1 <exec_byte_code+6738>, 0x61b339 =
<exec_byte_code+6842>, 0x61b3a9 <exec_byte_code+6954>, 0x61b419 <exec_byte_=
code+7066>, 0x61b489 <exec_byte_code+7178>, 0x61b4f9 <exec_byte_code+7290>,=
 0x61b580 <exec_byte_code+7425>, 0x61b5de <exec_byte_code+7519>, 0x61b665 <=
exec_byte_code+7654>, 0x61b6cd <exec_byte_code+7758>, 0x61b735 <exec_byt--T=
ype <RET> for more, q to quit, c to continue without paging--c
e_code+7862>, 0x61b8cd <exec_byte_code+8270>, 0x61a6d4 <exec_byte_code+3669=
>, 0x61b910 <exec_byte_code+8337>, 0x61b939 <exec_byte_code+8378>, 0x61b9ad=
 <exec_byte_code+8494>, 0x61b9f0 <exec_byte_code+8561>, 0x61ba33 <exec_byte=
_code+8628>, 0x61ba5c <exec_byte_code+8669>, 0x61ba87 <exec_byte_code+8712>=
, 0x61bab2 <exec_byte_code+8755>, 0x61bae5 <exec_byte_code+8806>, 0x61c461 =
<exec_byte_code+11234>, 0x61bb13 <exec_byte_code+8852>, 0x61bb3e <exec_byte=
_code+8895>, 0x61bb69 <exec_byte_code+8938>, 0x61bb94 <exec_byte_code+8981>=
, 0x61bbbf <exec_byte_code+9024>, 0x61bbea <exec_byte_code+9067>, 0x61a6d4 =
<exec_byte_code+3669>, 0x61c461 <exec_byte_code+11234>, 0x61bc13 <exec_byte=
_code+9108>, 0x61bc4f <exec_byte_code+9168>, 0x61bc78 <exec_byte_code+9209>=
, 0x61bca1 <exec_byte_code+9250>, 0x61bcd8 <exec_byte_code+9305>, 0x61bd0f =
<exec_byte_code+9360>, 0x61bd38 <exec_byte_code+9401>, 0x61bd61 <exec_byte_=
code+9442>, 0x61bd98 <exec_byte_code+9497>, 0x61bdcf <exec_byte_code+9552>,=
 0x61be06 <exec_byte_code+9607>, 0x61be31 <exec_byte_code+9650>, 0x61c461 <=
exec_byte_code+11234>, 0x61a674 <exec_byte_code+3573>, 0x61a425 <exec_byte_=
code+2982>, 0x619b40 <exec_byte_code+705>, 0x61a4bc <exec_byte_code+3133>, =
0x61a4fe <exec_byte_code+3199>, 0x61a540 <exec_byte_code+3265>, 0x61a586 <e=
xec_byte_code+3335>, 0x61a655 <exec_byte_code+3542>, 0x619f4c <exec_byte_co=
de+1741>, 0x61a6b5 <exec_byte_code+3638>, 0x61a700 <exec_byte_code+3713>, 0=
x61a75d <exec_byte_code+3806>, 0x61a789 <exec_byte_code+3850>, 0x61a8bc <ex=
ec_byte_code+4157>, 0x61a908 <exec_byte_code+4233>, 0x61a945 <exec_byte_cod=
e+4294>, 0x61a98e <exec_byte_code+4367>, 0x61c461 <exec_byte_code+11234>, 0=
x61be5a <exec_byte_code+9691>, 0x61be97 <exec_byte_code+9752>, 0x61bec0 <ex=
ec_byte_code+9793>, 0x61bee9 <exec_byte_code+9834>, 0x61bf12 <exec_byte_cod=
e+9875>, 0x61bf3b <exec_byte_code+9916>, 0x61bf72 <exec_byte_code+9971>, 0x=
61bfa9 <exec_byte_code+10026>, 0x61bfe0 <exec_byte_code+10081>, 0x61c017 <e=
xec_byte_code+10136>, 0x61c0f4 <exec_byte_code+10357>, 0x61c12b <exec_byte_=
code+10412>, 0x61c162 <exec_byte_code+10467>, 0x61c18b <exec_byte_code+1050=
8>, 0x61c207 <exec_byte_code+10632>, 0x61c287 <exec_byte_code+10760>, 0x61c=
2c2 <exec_byte_code+10819>, 0x61c2fd <exec_byte_code+10878>, 0x61b7d4 <exec=
_byte_code+8021>, 0x61b862 <exec_byte_code+8163>, 0x61c330 <exec_byte_code+=
10929>, 0x61c3d6 <exec_byte_code+11095>, 0x61c461 <exec_byte_code+11234>, 0=
x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <=
exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte=
_code+11234>, 0x61ad61 <exec_byte_code+5346>, 0x61b1e3 <exec_byte_code+6500=
>, 0x61b967 <exec_byte_code+8424>, 0x61c52a <exec_byte_code+11435>, 0x61c56=
c <exec_byte_code+11501>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_b=
yte_code+11234>, 0x61c5bb <exec_byte_code+11580>, 0x61c605 <exec_byte_code+=
11654>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0=
x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <=
exec_byte_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c461 <exec_byte=
_code+11234>, 0x61c461 <exec_byte_code+11234>, 0x61c7ec <exec_byte_code+121=
41> <repeats 64 times>}
        quitcounter =3D 25 '\031'
        bc =3D 0xb82df0 <main_thread+496>
        top =3D 0x7fffd4bff1b8
        pc =3D 0x7fffe28b7d41 "\266\005\202z\003\315\350\351\016C\"\003\206=
}\001\n\211A\022\242\211\262\r\315\324\003\003\003\334$\266\203\203\225\001=
\006\n\331\315O\262\v\210\334\352\353\006\f!!\262\v\211\203\267\001\316\016=
D\006\fC\"\026D\006\t\203\331\001\016D\262\n\210\202z\003\006\t\203\317\001=
\006\t\006\v\006\vAB\241\210\006\tA\262\n\210\202z\003\006\n\016DB\211\026D=
\262\n\210\202z\003\353\002\206\347\001\n\211A\022\242!\354\352\002!!\355\0=
01!\203\366\001\211\262\002\356\002\315\334#\266\003\202z\003\353\002\206\n=
\002\n\211A\022\242!\352\001!\354\001!\357\001!\203\032\002\211\262\002\016=
A\360\232\203)\002\361\002!\266\004\202z\003\362\002!\266\004\202z\003"...
        vector =3D <optimized out>
        maxdepth =3D <optimized out>
        const_length =3D <optimized out>
        bytestr_length =3D <optimized out>
        vectorp =3D 0x7fffe2359f58
        max_stack =3D <optimized out>
        frame_base =3D <optimized out>
        fp =3D <optimized out>
        bytestr_data =3D 0x7fffe28b7bd8 "\306 \210\b\203\034"
        rest =3D <optimized out>
        mandatory =3D <optimized out>
        nonrest =3D <optimized out>
        pushedargs =3D <optimized out>
        result =3D <optimized out>
#6  0x00000000005d2d4a in fetch_and_exec_byte_code (fun=3Dfun@entry=3DXIL(0=
x7fffe23478dd), args_template=3Dargs_template@entry=3D0, nargs=3Dnargs@entr=
y=3D0, args=3Dargs@entry=3D0x7fffffffce60) at eval.c:3135
#7  0x00000000005d5e2d in funcall_lambda (fun=3Dfun@entry=3DXIL(0x7fffe2347=
8dd), nargs=3Dnargs@entry=3D0, arg_vector=3Darg_vector@entry=3D0x7fffffffce=
60) at lisp.h:1298
        val =3D <optimized out>
        syms_left =3D make_fixnum(0)
        next =3D <optimized out>
        lexenv =3D <optimized out>
        i =3D <optimized out>
        optional =3D <optimized out>
        rest =3D <optimized out>
        previous_rest =3D <optimized out>
#8  0x00000000005d70d4 in apply_lambda (fun=3Dfun@entry=3DXIL(0x7fffe23478d=
d), args=3D<optimized out>, count=3Dcount@entry=3D...) at eval.c:3157
        arg_vector =3D 0x7fffffffce60
        tem =3D <optimized out>
        sa_avail =3D <optimized out>
        numargs =3D 0
        args_left =3D XIL(0)
#9  0x00000000005d5649 in eval_sub (form=3Dform@entry=3DXIL(0x7fffe27e4cf3)=
) at eval.c:2572
        original_fun =3D XIL(0x7fffe172de68)
        original_args =3D XIL(0)
        fun =3D XIL(0x7fffe23478dd)
        val =3D <optimized out>
        funcar =3D <optimized out>
        argvals =3D {XIL(0xcf1080), XIL(0x1), XIL(0xcf1080), XIL(0), XIL(0x=
7fffffffcf40), make_fixnum(1522323), XIL(0x7fffffffcf40), XIL(0xc23970)}
#10 0x00000000005d8039 in Feval (form=3DXIL(0x7fffe27e4cf3), lexical=3Dlexi=
cal@entry=3DXIL(0x30)) at eval.c:2389
#11 0x0000000000540f5f in top_level_2 () at lisp.h:1179
        setup_handler =3D true
        res =3D <optimized out>
#12 0x00000000005cfeb5 in internal_condition_case (bfun=3Dbfun@entry=3D0x54=
0f3c <top_level_2>, handlers=3Dhandlers@entry=3DXIL(0x90), hfun=3Dhfun@entr=
y=3D0x547d22 <cmd_error>) at eval.c:1537
        val =3D <optimized out>
        c =3D 0xd40910
#13 0x0000000000540e98 in top_level_1 (ignore=3Dignore@entry=3DXIL(0)) at l=
isp.h:1179
#14 0x00000000005cfdfc in internal_catch (tag=3Dtag@entry=3DXIL(0x10830), f=
unc=3Dfunc@entry=3D0x540e76 <top_level_1>, arg=3Darg@entry=3DXIL(0)) at eva=
l.c:1217
        val =3D <optimized out>
        c =3D 0xd35ec0
#15 0x0000000000540e15 in command_loop () at lisp.h:1179
#16 0x0000000000547893 in recursive_edit_1 () at keyboard.c:744
        val =3D <optimized out>
#17 0x0000000000547c51 in Frecursive_edit () at keyboard.c:827
        buffer =3D <optimized out>
#18 0x0000000000540211 in main (argc=3D5, argv=3D0x7fffffffd208) at emacs.c=
:2624
        stack_bottom_variable =3D 0x6a046d <__libc_csu_init+77>
        old_argc =3D <optimized out>
        no_loadup =3D false
        junk =3D 0x0
        dname_arg =3D 0x0
        ch_to_dir =3D 0x0
        original_pwd =3D 0x0
        dump_mode =3D <optimized out>
        skip_args =3D 1
        temacs =3D 0x0
        attempt_load_pdump =3D <optimized out>
        only_version =3D false
        rlim =3D {
          rlim_cur =3D 10022912,=20
          rlim_max =3D 18446744073709551615
        }
        lc_all =3D <optimized out>
        sockfd =3D -1
        module_assertions =3D <optimized out>

Lisp Backtrace:
"profiler-cpu-log" (0xffffcc00)
"eval" (0xd4bff1c0)
"command-line-1" (0xd4bff0b8)
"command-line" (0xd4bff040)
"normal-top-level" (0xffffce60)
(gdb) xbacktrace
"profiler-cpu-log" (0xffffcc00)
"eval" (0xd4bff1c0)
"command-line-1" (0xd4bff0b8)
"command-line" (0xd4bff040)
"normal-top-level" (0xffffce60)

--=-=-=
Content-Type: text/plain


In GNU Emacs 30.0.50 (build 7, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2025-06-11 built on
 igm-qws-u12685a
Repository revision: 22201dde773e5404f80baa1f59768e88d97a322a
Repository branch: HEAD
System Description: Rocky Linux 8.10 (Green Obsidian)

Configured using:
 'configure --config-cache --with-x-toolkit=lucid --without-gpm
 --without-gconf --without-selinux --without-imagemagick --with-modules
 --with-gif=no --with-cairo --with-rsvg --without-compress-install
 --with-tree-sitter --with-native-compilation=aot --prefix=
 'CFLAGS=-ggdb3 -Og -fno-omit-frame-pointer' LDFLAGS=-ggdb3'

Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG
SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER X11
XDBE XIM XINPUT2 XPM LUCID ZLIB

Important settings:
  value of $LANG: en_US.utf8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util time-date subr-x mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
compile text-property-search comint ansi-osc ansi-color ring comp-run
comp-common rx term/xterm xterm byte-opt gv bytecomp byte-compile rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify dynamic-setting system-font-setting
font-render-setting cairo x-toolkit xinput2 x multi-tty move-toolbar
make-network-process native-compile emacs)

Memory information:
((conses 16 108023 11051) (symbols 48 6804 0) (strings 32 28851 2118)
 (string-bytes 1 959502) (vectors 16 17388)
 (vector-slots 8 258214 11288) (floats 8 38 51) (intervals 56 297 3)
 (buffers 984 11))

--=-=-=--



------------=_1749913082-4528-3--


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#78762: closed (Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log), Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log, [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
Resent-From: Spencer Baugh <sbaugh@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 16 Jun 2025 18:58:04 +0000
Resent-Message-ID: <handler.78762.B78762.175010025812928 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 78762
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: 78762 <at> debbugs.gnu.org
Cc: eliz@HIDDEN, zach@HIDDEN
X-Debbugs-Original-To: help-debbugs@HIDDEN (GNU bug Tracking System)
X-Debbugs-Original-Cc: Eli Zaretskii <eliz@HIDDEN>, Zach Shaftel <zach@HIDDEN>, 78762 <at> debbugs.gnu.org
Received: via spool by 78762-submit <at> debbugs.gnu.org id=B78762.175010025812928
          (code B ref 78762); Mon, 16 Jun 2025 18:58:04 +0000
Received: (at 78762) by debbugs.gnu.org; 16 Jun 2025 18:57:38 +0000
Received: from localhost ([127.0.0.1]:48818 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uRF1T-0003MF-L2
	for submit <at> debbugs.gnu.org; Mon, 16 Jun 2025 14:57:37 -0400
Received: from mxout5.mail.janestreet.com ([64.215.233.18]:41647)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <sbaugh@HIDDEN>)
 id 1uRF1P-0003Kz-LE
 for 78762 <at> debbugs.gnu.org; Mon, 16 Jun 2025 14:57:32 -0400
From: Spencer Baugh <sbaugh@HIDDEN>
In-Reply-To: <handler.78762.D78762.17499130304321.notifdone <at> debbugs.gnu.org>
 (GNU bug Tracking System's message of "Sat, 14 Jun 2025 14:58:02
 +0000")
References: <86v7oyqslh.fsf@HIDDEN> <87v7p2xczj.fsf@HIDDEN>
 <handler.78762.D78762.17499130304321.notifdone <at> debbugs.gnu.org>
Date: Mon, 16 Jun 2025 14:57:26 -0400
Message-ID: <ier5xgvo6p5.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com;
 s=waixah; t=1750100246;
 bh=MdWN2IA0BcpZ0iQ/ppJx27Pl1QTXwVmI0NyRsldDzJI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date;
 b=B0C4X+XNY+5SykEFt+5dI5Bd4VqRyH/UUFRycyN9U9AVvT7gbu/vTRZcbedCN9Zo9
 V+yJxNrWxx68uweuZLCpvt0pn0LEwEGKvFudqyiG/dKvZUOEOH6uO6qdDFZa4de382
 Owjf3TbgIF5xMe83fPsb3BOg2eRm3mdNbHKunm93Xfke6Drx75a27iWnqMkq4ByA/p
 oBKB/+b8LhAdyuOOzG3aAR9GB6u9usoF+QeXLm+ENevqK4qMurTunAnEP00HXXi8kQ
 k4LAhNMTsRLXLUa70tDdRCLvPdNiQBBbEhU+NAzdFanMb817SedW6PApsmMHWT87ft
 a4FjRelVBBqcQ==
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)


This segfault affects Emacs 30 too, so it should be backported to
emacs-30.




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#78762: closed (Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log), Re: bug#78762: [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log, [PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Tue, 17 Jun 2025 11:18:03 +0000
Resent-Message-ID: <handler.78762.B78762.17501590699386 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 78762
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
To: Spencer Baugh <sbaugh@HIDDEN>
Cc: zach@HIDDEN, 78762 <at> debbugs.gnu.org
Received: via spool by 78762-submit <at> debbugs.gnu.org id=B78762.17501590699386
          (code B ref 78762); Tue, 17 Jun 2025 11:18:03 +0000
Received: (at 78762) by debbugs.gnu.org; 17 Jun 2025 11:17:49 +0000
Received: from localhost ([127.0.0.1]:55130 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uRUK4-0002RF-Ik
	for submit <at> debbugs.gnu.org; Tue, 17 Jun 2025 07:17:49 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50490)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1uRUK2-0002Q5-Aj
 for 78762 <at> debbugs.gnu.org; Tue, 17 Jun 2025 07:17:47 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1uRUJw-0002cO-51; Tue, 17 Jun 2025 07:17:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=TQjsIHJCyBddFXRv3r9r7/42VOFkv0X6/BPe/NFQ6OQ=; b=XEpJRy9TYgD7
 RUZd7SHCGMecG/HEO84Ceb2HliCdoAqSqj5c7ED8Z+ywacrlU820vvnui4A7APp0WwwN0Zt9xBcOo
 FW/bAi/F+DSc+cb+dl+tz92nJBmttY/ZDhVHLfDJ0qCw1FgtuhBtfstA9rYlcNZQizynSZgyeOF9+
 0JUigrlLxzJRb5/D5evystv4nszD9PMbEDU2IpBXd3NhuHb0th8N4/NfgIkMDh/ZVxuEV7G9bFmhu
 fyG+dVRiOmJdro7c9NFMqK0dTP7SqalkcdtRyGeMzYvcW9+cPPxmKDJgLAHvuG6HqOUeMq0P93Uyn
 QIuvLIfqG43i1GoOpwITTA==;
Date: Tue, 17 Jun 2025 14:17:34 +0300
Message-Id: <86h60eobw1.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-Reply-To: <ier5xgvo6p5.fsf_-_@HIDDEN> (message from Spencer Baugh
 on Mon, 16 Jun 2025 14:57:26 -0400)
References: <86v7oyqslh.fsf@HIDDEN> <87v7p2xczj.fsf@HIDDEN>
 <handler.78762.D78762.17499130304321.notifdone <at> debbugs.gnu.org>
 <ier5xgvo6p5.fsf_-_@HIDDEN>
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Spencer Baugh <sbaugh@HIDDEN>
> Cc: Zach Shaftel <zach@HIDDEN>,  78762 <at> debbugs.gnu.org, Eli Zaretskii
>   <eliz@HIDDEN>
> Date: Mon, 16 Jun 2025 14:57:26 -0400
> 
> 
> This segfault affects Emacs 30 too, so it should be backported to
> emacs-30.

It changes behavior (because it returns nil in some case).  Emacs 29
indeed didn't crash when the bug's scenario was run, but it signaled
an error, so this scenario never worked in Emacs.

So on balance I'd prefer not to backport it, sorry.





Last modified: Tue, 17 Jun 2025 11:30:02 UTC

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