diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-03-01 12:36:58 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-03-01 12:36:58 -0500 |
commit | 07f3236133b01cb65806eb1a6bf2ebaecbdd2d81 (patch) | |
tree | 92926bbae901d3f1faa0918fefb6ef20cbd8b729 /src/profiler.c | |
parent | 1f1d36fa8080479083af8c69e8ea3756d51910fb (diff) | |
download | emacs-07f3236133b01cb65806eb1a6bf2ebaecbdd2d81.tar.gz |
* src/profiler.c (malloc_probe): Make it safe for GC (bug#60237)
Diffstat (limited to 'src/profiler.c')
-rw-r--r-- | src/profiler.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/profiler.c b/src/profiler.c index 81b5e7b0cf0..8247b2e90c6 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -505,6 +505,9 @@ Before returning, a new log is allocated for future samples. */) void malloc_probe (size_t size) { + if (EQ (backtrace_top_function (), QAutomatic_GC)) /* bug#60237 */ + /* FIXME: We should do something like what we did with `cpu_gc_count`. */ + return; eassert (HASH_TABLE_P (memory_log)); record_backtrace (XHASH_TABLE (memory_log), min (size, MOST_POSITIVE_FIXNUM)); } |