From c00d3a54ddeac43af72ca624bef2451ddea35789 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Sun, 11 May 2025 21:25:11 +0200 Subject: [PATCH] Regtest: add an xml version of memcheck realloc_size_zero --- memcheck/tests/Makefile.am | 3 + .../tests/realloc_size_zero_xml.stderr.exp | 90 +++++++++++++++++++ .../tests/realloc_size_zero_xml.stdout.exp | 2 + memcheck/tests/realloc_size_zero_xml.vgtest | 6 ++ 4 files changed, 101 insertions(+) create mode 100644 memcheck/tests/realloc_size_zero_xml.stderr.exp create mode 100644 memcheck/tests/realloc_size_zero_xml.stdout.exp create mode 100644 memcheck/tests/realloc_size_zero_xml.vgtest diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 401fe8ca8e..06d97ae5aa 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -353,6 +353,9 @@ EXTRA_DIST = \ realloc_size_zero.stderr.exp realloc_size_zero.stdout.exp-glibc \ realloc_size_zero.stdout.exp-other \ realloc_size_zero.vgtest \ + realloc_size_zero_xml.stderr.exp \ + realloc_size_zero_xml.stdout.exp \ + realloc_size_zero_xml.vgtest \ realloc_size_zero_yes.stderr.exp realloc_size_zero_yes.stdout.exp \ realloc_size_zero_yes.vgtest \ realloc_size_zero_again_yes.stderr.exp \ diff --git a/memcheck/tests/realloc_size_zero_xml.stderr.exp b/memcheck/tests/realloc_size_zero_xml.stderr.exp new file mode 100644 index 0000000000..3b6450ff4e --- /dev/null +++ b/memcheck/tests/realloc_size_zero_xml.stderr.exp @@ -0,0 +1,90 @@ + + + + +4 +memcheck + + + ... + ... + ... + ... + + +... +... +memcheck + + + ... + + ./realloc_size_zero + + + + + RUNNING + + + + + 0x........ + ... + ReallocSizeZero + realloc() with size 0 + + + 0x........ + ... + realloc + ... + vg_replace_malloc.c + ... + + + 0x........ + ... + main + ... + realloc_size_zero.c + ... + + + Address 0x........ is 0 bytes inside a block of size 1,024 alloc'd + + + 0x........ + ... + malloc + ... + vg_replace_malloc.c + ... + + + 0x........ + ... + main + ... + realloc_size_zero.c + ... + + + + + + + FINISHED + + + + + + ... + 0x........ + + + + + + diff --git a/memcheck/tests/realloc_size_zero_xml.stdout.exp b/memcheck/tests/realloc_size_zero_xml.stdout.exp new file mode 100644 index 0000000000..103f1d5ebc --- /dev/null +++ b/memcheck/tests/realloc_size_zero_xml.stdout.exp @@ -0,0 +1,2 @@ +p not NULL after realloc 0 +p2 not NULL after realloc 0 diff --git a/memcheck/tests/realloc_size_zero_xml.vgtest b/memcheck/tests/realloc_size_zero_xml.vgtest new file mode 100644 index 0000000000..1b88b523bc --- /dev/null +++ b/memcheck/tests/realloc_size_zero_xml.vgtest @@ -0,0 +1,6 @@ +prog: realloc_size_zero +vgopts: -q --xml=yes --xml-fd=2 --log-file=/dev/null +stderr_filter: filter_xml + + + -- 2.47.2