GNU bug report logs -
#78762
[PATCH] Fix segfault in profiler-cpu-log and profiler-memory-log
Previous Next
Reported by: Zach Shaftel <zach <at> shaf.tel>
Date: Wed, 11 Jun 2025 20:04:01 UTC
Severity: normal
Tags: patch
Merged with 78763
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
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''
[0001-Fix-segfault-in-profiler-cpu-log-and-profiler-memory.patch (text/patch, attachment)]
This bug report was last modified 2 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.