* src/profiler.c (malloc_probe): Make it safe for GC (bug#60237)

This commit is contained in:
Stefan Monnier 2023-03-01 12:36:58 -05:00
parent 1f1d36fa80
commit 07f3236133

View file

@ -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));
}