ignore the intentional use-after-free

Wed, 27 Dec 2023 17:28:33 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 27 Dec 2023 17:28:33 +0100
changeset 775
d3f451440eef
parent 774
4fd4e0c6107a
child 776
874cc78cdffd

ignore the intentional use-after-free

tests/util_allocator.c file | annotate | diff | comparison | revisions
--- a/tests/util_allocator.c	Wed Dec 27 17:19:54 2023 +0100
+++ b/tests/util_allocator.c	Wed Dec 27 17:28:33 2023 +0100
@@ -83,9 +83,12 @@
             data->alloc_failed++;
         } else {
             data->free_total++;
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuse-after-free"
             if (!cx_testing_allocator_untrack(data, mem)) {
                 data->free_failed++;
             }
+#pragma GCC diagnostic pop
             cx_testing_allocator_track(data, ptr);
         }
         return ptr;

mercurial