mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
preload: add assertion for performance hack
We steal two pointers temporarily, so ensure that we have the space to overwrite a couple of addresses.
This commit is contained in:
@ -77,6 +77,10 @@ backtrace_func (SysprofCaptureAddress *addrs,
|
||||
guint n_addrs,
|
||||
gpointer user_data)
|
||||
{
|
||||
/* Ensure we have at least two pointers to steal temporarily below */
|
||||
G_STATIC_ASSERT (G_STRUCT_OFFSET (SysprofCaptureSample, addrs) >= 16);
|
||||
G_STATIC_ASSERT (G_STRUCT_OFFSET (SysprofCaptureAllocation, addrs) >= 16);
|
||||
|
||||
#if defined(ENABLE_LIBUNWIND)
|
||||
# if GLIB_SIZEOF_VOID_P == 8
|
||||
/* We know that collector will overwrite fields *AFTER* it
|
||||
|
||||
Reference in New Issue
Block a user