X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Futil%2Fu_debug_stack_test.cpp;h=b9a563488c0bcb0dca6ea346ac83a8d0ead5597e;hp=b5f8ea4ba386e8551edf68a8ee55cef4467df048;hb=HEAD;hpb=d0d14f3f6481e015b4413fa0487164b76fe45296 diff --git a/src/util/u_debug_stack_test.cpp b/src/util/u_debug_stack_test.cpp index b5f8ea4ba38..b9a563488c0 100644 --- a/src/util/u_debug_stack_test.cpp +++ b/src/util/u_debug_stack_test.cpp @@ -24,9 +24,10 @@ #include #include +#include "util/macros.h" #include "util/u_debug_stack.h" -static void __attribute__((noinline)) +static void ATTRIBUTE_NOINLINE func_a(void) { struct debug_stack_frame backtrace[16]; @@ -36,7 +37,7 @@ func_a(void) debug_backtrace_dump(backtrace, 16); } -static void __attribute__((noinline)) +static void ATTRIBUTE_NOINLINE func_b(void) { struct debug_stack_frame backtrace[16]; @@ -48,7 +49,7 @@ func_b(void) debug_backtrace_dump(backtrace, 16); } -static void __attribute__((noinline)) +static void ATTRIBUTE_NOINLINE func_c(struct debug_stack_frame *frames) { debug_backtrace_capture(frames, 0, 16); @@ -106,6 +107,9 @@ TEST(u_debug_stack_test, capture_not_overwritten) if (size > 0) { EXPECT_STRNE(bt1, bt2); } + + free(bt1); + free(bt2); } #endif