]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add 32bit version of sized_aligned_new_delete_args expected
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 7 Mar 2023 21:58:57 +0000 (22:58 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 7 Mar 2023 21:58:57 +0000 (22:58 +0100)
Asl add some parens to shut up clangd

coregrind/m_replacemalloc/vg_replace_malloc.c
memcheck/tests/Makefile.am
memcheck/tests/sized_aligned_new_delete_args.stderr.exp_32 [new file with mode: 0644]

index e07ab505047ae0146c3ea8f5dd0243a3da0222c2..e122371202b5f987689815ff325b45f797326073 100644 (file)
@@ -68,7 +68,7 @@
 #include "pub_core_redir.h"         // for VG_REPLACE_FUNCTION_*
 #include "pub_core_replacemalloc.h"
 
-#define VG_ALIGN_ROUNDUP(size, alignment)   ((size + alignment - 1) & ~(alignment - 1))
+#define VG_ALIGN_ROUNDUP(size, alignment)   (((size) + (alignment) - 1) & ~((alignment) - 1))
 
 /* Assignment of behavioural equivalence class tags: 1NNNP is intended
    to be reserved for the Valgrind core.  Current usage:
index dc0f39aa6532f3c4cf944b1ec08414b7043a36a8..e6afff0d00502c3231a7bdd168d6f51aac070ee2 100644 (file)
@@ -141,6 +141,7 @@ EXTRA_DIST = \
                cxx17_aligned_new.stdout.exp \
        sized_aligned_new_delete_args.stderr.exp \
                sized_aligned_new_delete_args.vgtest \
+               sized_aligned_new_delete_args.stderr.exp_32 \
        deep-backtrace.vgtest deep-backtrace.stderr.exp \
        demangle.stderr.exp demangle.vgtest \
        big_debuginfo_symbol.stderr.exp big_debuginfo_symbol.vgtest \
diff --git a/memcheck/tests/sized_aligned_new_delete_args.stderr.exp_32 b/memcheck/tests/sized_aligned_new_delete_args.stderr.exp_32
new file mode 100644 (file)
index 0000000..dfa8367
--- /dev/null
@@ -0,0 +1,83 @@
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator new(unsigned int, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:16)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator new(unsigned int, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:16)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator delete(void*, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:17)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator new[](unsigned int, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:19)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator new[](unsigned int, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:19)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator delete[](void*, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:20)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator new(unsigned int, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:24)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator new(unsigned int, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:24)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator delete(void*, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:25)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator new[](unsigned int, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:27)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator new[](unsigned int, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:27)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator delete[](void*, std::align_val_t, std::nothrow_t const&) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:28)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: ...operator delete... (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:31)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator delete[](void*, unsigned int) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:34)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator delete(void*, unsigned int, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:37)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator delete(void*, unsigned int, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:37)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator delete[](void*, unsigned int, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:40)
+
+Conditional jump or move depends on uninitialised value(s)
+   at 0x........: operator delete[](void*, unsigned int, std::align_val_t) (vg_replace_malloc.c:...)
+   by 0x........: main (sized_aligned_new_delete_args.cpp:40)
+
+
+HEAP SUMMARY:
+    in use at exit: 0 bytes in 0 blocks
+  total heap usage: 8 allocs, 8 frees, 128 bytes allocated
+
+For a detailed leak analysis, rerun with: --leak-check=full
+
+Use --track-origins=yes to see where uninitialised values come from
+For lists of detected and suppressed errors, rerun with: -s
+ERROR SUMMARY: 18 errors from 18 contexts (suppressed: 0 from 0)