You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
|
|
2
(1) |
3
|
4
(1) |
5
|
6
(3) |
7
|
8
|
|
9
|
10
(1) |
11
(1) |
12
|
13
|
14
|
15
|
|
16
|
17
(1) |
18
(2) |
19
(1) |
20
|
21
|
22
|
|
23
(1) |
24
(2) |
25
(1) |
26
|
27
|
28
(1) |
29
|
|
30
|
31
|
|
|
|
|
|
|
From: Paul F. <pa...@so...> - 2023-07-24 20:10:41
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=6ce0979884a8f246c80a098333ceef1a7b7f694d commit 6ce0979884a8f246c80a098333ceef1a7b7f694d Author: Paul Floyd <pj...@wa...> Date: Mon Jul 24 22:06:00 2023 +0200 Bug 472219 - Syscall param ppoll(ufds.events) points to uninitialised byte(s) Add checks that (p)poll fd is not negative. If it is negative, don't check the events field. Diff: --- .gitignore | 1 + NEWS | 1 + coregrind/m_syswrap/syswrap-freebsd.c | 12 ++++++------ coregrind/m_syswrap/syswrap-generic.c | 6 ++++-- coregrind/m_syswrap/syswrap-linux.c | 6 ++++-- coregrind/m_syswrap/syswrap-solaris.c | 5 +++-- memcheck/tests/Makefile.am | 4 ++++ memcheck/tests/bug472219.c | 16 ++++++++++++++++ memcheck/tests/bug472219.stderr.exp | 0 memcheck/tests/bug472219.vgtest | 2 ++ memcheck/tests/freebsd/scalar.c | 12 +++++++++--- memcheck/tests/freebsd/scalar.stderr.exp | 23 +++++++++++++++++++---- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 23 +++++++++++++++++++---- memcheck/tests/solaris/scalar.stderr.exp | 4 ---- memcheck/tests/x86-linux/scalar.stderr.exp | 5 ----- 15 files changed, 88 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 9e16ac126d..6538eb718b 100644 --- a/.gitignore +++ b/.gitignore @@ -845,6 +845,7 @@ /memcheck/tests/bug287260 /memcheck/tests/bug340392 /memcheck/tests/bug464969_d_demangle +/memcheck/tests/bug472219 /memcheck/tests/calloc-overflow /memcheck/tests/cdebug_zlib /memcheck/tests/cdebug_zlib_gnu diff --git a/NEWS b/NEWS index 783612fbb9..867d2f0f43 100644 --- a/NEWS +++ b/NEWS @@ -45,6 +45,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. Assertion 'resolved' failed 470830 Don't print actions vgdb me ... continue for vgdb --multi mode 470978 s390x: Valgrind cannot start qemu-kvm when "sysctl vm.allocate_pgste=0" +472219 Syscall param ppoll(ufds.events) points to uninitialised byte(s) To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 6b9f3d2109..9af37cfb83 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -6124,15 +6124,15 @@ PRE(sys_ppoll) struct vki_pollfd *, fds, unsigned int, nfds, struct vki_timespec *, timeout, vki_sigset_t *, newsigmask); - if (ML_(safe_to_deref)(fds, ARG2*sizeof(struct vki_pollfd))) { - for (i = 0; i < ARG2; i++) { - PRE_MEM_READ( "ppoll(fds.fd)", - (Addr)(&fds[i].fd), sizeof(fds[i].fd) ); + for (i = 0; i < ARG2; i++) { + PRE_MEM_READ( "ppoll(fds.fd)", + (Addr)(&fds[i].fd), sizeof(fds[i].fd) ); + if (ML_(safe_to_deref)(&fds[i].fd, sizeof(fds[i].fd)) && fds[i].fd >= 0) { PRE_MEM_READ( "ppoll(fds.events)", (Addr)(&fds[i].events), sizeof(fds[i].events) ); - PRE_MEM_WRITE( "ppoll(fds.revents)", - (Addr)(&fds[i].revents), sizeof(fds[i].revents) ); } + PRE_MEM_WRITE( "ppoll(fds.revents)", + (Addr)(&fds[i].revents), sizeof(fds[i].revents) ); } if (ARG3) { diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index efdae60e10..ed9d14685f 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -4339,8 +4339,10 @@ PRE(sys_poll) for (i = 0; i < ARG2; i++) { PRE_MEM_READ( "poll(ufds.fd)", (Addr)(&ufds[i].fd), sizeof(ufds[i].fd) ); - PRE_MEM_READ( "poll(ufds.events)", - (Addr)(&ufds[i].events), sizeof(ufds[i].events) ); + if (ML_(safe_to_deref)(&ufds[i].fd, sizeof(ufds[i].fd)) && ufds[i].fd >= 0) { + PRE_MEM_READ( "poll(ufds.events)", + (Addr)(&ufds[i].events), sizeof(ufds[i].events) ); + } PRE_MEM_WRITE( "poll(ufds.revents)", (Addr)(&ufds[i].revents), sizeof(ufds[i].revents) ); } diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index f8621f8f0d..20c68c877c 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -1984,8 +1984,10 @@ static void ppoll_pre_helper ( ThreadId tid, SyscallArgLayout* layout, for (i = 0; i < ARG2; i++) { PRE_MEM_READ( "ppoll(ufds.fd)", (Addr)(&ufds[i].fd), sizeof(ufds[i].fd) ); - PRE_MEM_READ( "ppoll(ufds.events)", - (Addr)(&ufds[i].events), sizeof(ufds[i].events) ); + if (ufds[i].fd >= 0) { + PRE_MEM_READ( "ppoll(ufds.events)", + (Addr)(&ufds[i].events), sizeof(ufds[i].events) ); + } PRE_MEM_WRITE( "ppoll(ufds.revents)", (Addr)(&ufds[i].revents), sizeof(ufds[i].revents) ); } diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 8a2a140f95..ed3cb4a551 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -7831,8 +7831,9 @@ PRE(sys_pollsys) for (i = 0; i < ARG2; i++) { vki_pollfd_t *u = &ufds[i]; PRE_FIELD_READ("poll(ufds.fd)", u->fd); - /* XXX Check if it's valid? */ - PRE_FIELD_READ("poll(ufds.events)", u->events); + if (ML_(safe_to_deref)(&ufds[i].fd, sizeof(ufds[i].fd)) && ufds[i].fd >= 0) { + PRE_FIELD_READ("poll(ufds.events)", u->events); + } PRE_FIELD_WRITE("poll(ufds.revents)", u->revents); } diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 5a17fd35d4..307f47bd8e 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -118,6 +118,7 @@ EXTRA_DIST = \ bug340392.stderr.exp bug340392.vgtest \ bug464969_d_demangle.stderr.exp bug464969_d_demangle.vgtest \ bug464969_d_demangle.stdout.exp \ + bug472219.stderr.exp bug472219.vgtest \ calloc-overflow.stderr.exp calloc-overflow.vgtest\ cdebug_zlib.stderr.exp cdebug_zlib.vgtest \ cdebug_zlib_gnu.stderr.exp cdebug_zlib_gnu.vgtest \ @@ -415,6 +416,7 @@ check_PROGRAMS = \ bug287260 \ bug340392 \ bug464969_d_demangle \ + bug472219 \ calloc-overflow \ client-msg \ clientperm \ @@ -566,6 +568,7 @@ leak_cpp_interior_SOURCES = leak_cpp_interior.cpp accounting_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ badfree_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_FREE_NONHEAP_OBJECT@ bug155125_CFLAGS = $(AM_CFLAGS) -Wno-unused-result @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ +bug472219_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ mallinfo_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations malloc3_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_ALLOC_SIZE_LARGER_THAN@ sbfragment_CFLAGS = $(AM_CFLAGS) -Wno-deprecated-declarations @@ -663,6 +666,7 @@ reach_thread_register_LDADD = -lpthread realloc_size_zero_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_INCOMPATIBLE_POINTER_TYPES_DISCARDS_QUALIFIERS@ realloc_size_zero_mismatch_SOURCES = realloc_size_zero_mismatch.cpp +realloc_size_zero_mismatch_CXXFLAGS = $(AM_CXXFLAGS) @FLAG_W_NO_MISMATCHED_NEW_DELETE@ resvn_stack_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNINITIALIZED@ diff --git a/memcheck/tests/bug472219.c b/memcheck/tests/bug472219.c new file mode 100644 index 0000000000..88567caa2c --- /dev/null +++ b/memcheck/tests/bug472219.c @@ -0,0 +1,16 @@ +#include <poll.h> +#include <stdlib.h> +#include "../../config.h" + +int main() +{ + int uninit; + struct pollfd fds[] = {{-1, uninit, 0}, {2, POLLIN, 0}}; + + poll(fds, 2, 100); + +#if defined(HAVE_PPOLL) + struct timespec timeout = {0, 1e8}; + ppoll(fds, 2, &timeout, NULL); +#endif +} diff --git a/memcheck/tests/bug472219.stderr.exp b/memcheck/tests/bug472219.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/memcheck/tests/bug472219.vgtest b/memcheck/tests/bug472219.vgtest new file mode 100644 index 0000000000..8cd48c785d --- /dev/null +++ b/memcheck/tests/bug472219.vgtest @@ -0,0 +1,2 @@ +prog: bug472219 +vgopts: -q diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index c6a7ff2d5c..6c8d81aa6e 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -781,9 +781,15 @@ int main(void) /* netbsd newreboot 208 */ /* SYS_poll 209 */ - GO(SYS_poll, "3s 3m"); + GO(SYS_poll, "2s 2m"); SY(SYS_poll, x0, x0+1, x0); FAIL; + { + struct pollfd fds = { x0, x0, x0 }; + GO(SYS_poll, "0s 2m"); + SY(SYS_poll, &fds, 1, 1); SUCC; + } + /* SYS_freebsd7___semctl 220 */ GO(SYS_freebsd7___semctl, "(IPC_INFO) 4s 1m"); SY(SYS_freebsd7___semctl, x0, x0, x0+IPC_INFO, x0+1); FAIL; @@ -1948,8 +1954,8 @@ int main(void) { struct pollfd arg1; arg1.fd = arg1.events = arg1.revents = x0; - GO(SYS_ppoll, "2s 2+2m"); - SY(SYS_ppoll, &arg1, 1, x0+1, x0+1); FAIL; + GO(SYS_ppoll, "2s 2+2m"); + SY(SYS_ppoll, &arg1, 1, x0+1, x0+1); FAIL; } /* SYS_futimens 546 */ diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 2595bd38c5..5a4f3230f1 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -1529,7 +1529,7 @@ Syscall param getpgid(pid) contains uninitialised byte(s) ... --------------------------------------------------------- -209: SYS_poll 3s 3m +209: SYS_poll 2s 2m --------------------------------------------------------- Syscall param poll(ufds) contains uninitialised byte(s) ... @@ -1544,13 +1544,20 @@ Syscall param poll(ufds.fd) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd -Syscall param poll(ufds.events) points to unaddressable byte(s) +Syscall param poll(ufds.revents) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd -Syscall param poll(ufds.revents) points to unaddressable byte(s) +--------------------------------------------------------- +209: SYS_poll 0s 2m +--------------------------------------------------------- +Syscall param poll(ufds.fd) points to uninitialised byte(s) ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd + Address 0x........ is on thread 1's stack + +Syscall param poll(ufds.events) points to uninitialised byte(s) + ... + Address 0x........ is on thread 1's stack --------------------------------------------------------- 220: SYS_freebsd7___semctl (IPC_INFO) 4s 1m @@ -4968,6 +4975,14 @@ Syscall param ppoll(timeout) contains uninitialised byte(s) Syscall param ppoll(newsigmask) contains uninitialised byte(s) ... +Syscall param ppoll(fds.fd) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param ppoll(fds.revents) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + Syscall param ppoll(timeout) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index e995fc28d6..a45d0601c3 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -1529,7 +1529,7 @@ Syscall param getpgid(pid) contains uninitialised byte(s) ... --------------------------------------------------------- -209: SYS_poll 3s 3m +209: SYS_poll 2s 2m --------------------------------------------------------- Syscall param poll(ufds) contains uninitialised byte(s) ... @@ -1544,13 +1544,20 @@ Syscall param poll(ufds.fd) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd -Syscall param poll(ufds.events) points to unaddressable byte(s) +Syscall param poll(ufds.revents) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd -Syscall param poll(ufds.revents) points to unaddressable byte(s) +--------------------------------------------------------- +209: SYS_poll 0s 2m +--------------------------------------------------------- +Syscall param poll(ufds.fd) points to uninitialised byte(s) ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd + Address 0x........ is on thread 1's stack + +Syscall param poll(ufds.events) points to uninitialised byte(s) + ... + Address 0x........ is on thread 1's stack --------------------------------------------------------- 220: SYS_freebsd7___semctl (IPC_INFO) 4s 1m @@ -5023,6 +5030,14 @@ Syscall param ppoll(timeout) contains uninitialised byte(s) Syscall param ppoll(newsigmask) contains uninitialised byte(s) ... +Syscall param ppoll(fds.fd) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param ppoll(fds.revents) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + Syscall param ppoll(timeout) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd diff --git a/memcheck/tests/solaris/scalar.stderr.exp b/memcheck/tests/solaris/scalar.stderr.exp index 1a04979d19..a1b5d97d7a 100644 --- a/memcheck/tests/solaris/scalar.stderr.exp +++ b/memcheck/tests/solaris/scalar.stderr.exp @@ -3244,10 +3244,6 @@ Syscall param poll(ufds.fd) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd -Syscall param poll(ufds.events) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - Syscall param poll(ufds.revents) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd diff --git a/memcheck/tests/x86-linux/scalar.stderr.exp b/memcheck/tests/x86-linux/scalar.stderr.exp index b9202a8c2f..6b8c7677f5 100644 --- a/memcheck/tests/x86-linux/scalar.stderr.exp +++ b/memcheck/tests/x86-linux/scalar.stderr.exp @@ -2122,11 +2122,6 @@ Syscall param poll(ufds.fd) points to unaddressable byte(s) by 0x........: main (scalar.c:761) Address 0x........ is not stack'd, malloc'd or (recently) free'd -Syscall param poll(ufds.events) points to unaddressable byte(s) - ... - by 0x........: main (scalar.c:761) - Address 0x........ is not stack'd, malloc'd or (recently) free'd - Syscall param poll(ufds.revents) points to unaddressable byte(s) ... by 0x........: main (scalar.c:761) |
|
From: Paul F. <pa...@so...> - 2023-07-24 19:33:46
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=b368b44c552d0deb4d0ee77968cb0e8e02a07812 commit b368b44c552d0deb4d0ee77968cb0e8e02a07812 Author: Paul Floyd <pj...@wa...> Date: Mon Jul 24 21:32:45 2023 +0200 Solaris: add a configure test for getaddrinfo Not available on Solaris 11.3 Diff: --- configure.ac | 3 +++ drd/tests/getaddrinfo.vgtest | 2 +- helgrind/tests/Makefile.am | 5 ++++- helgrind/tests/getaddrinfo.vgtest | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 4dbb1753c7..b4e9c11428 100755 --- a/configure.ac +++ b/configure.ac @@ -4849,6 +4849,7 @@ AC_CHECK_FUNCS([ \ copy_file_range \ epoll_create \ epoll_pwait \ + getaddrinfo \ klogctl \ mallinfo \ memchr \ @@ -4916,6 +4917,8 @@ AM_CONDITIONAL([HAVE_SETCONTEXT], [test x$ac_cv_func_setcontext = xyes]) AM_CONDITIONAL([HAVE_SWAPCONTEXT], [test x$ac_cv_func_swapcontext = xyes]) AM_CONDITIONAL([HAVE_MEMFD_CREATE], [test x$ac_cv_func_memfd_create = xyes]) +AM_CONDITIONAL([HAVE_GETADDRINFO], + [test x$ac_cv_func_getaddrinfo = xyes]) if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \ -o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX \ diff --git a/drd/tests/getaddrinfo.vgtest b/drd/tests/getaddrinfo.vgtest index 6faa2b6bde..a62baadb92 100644 --- a/drd/tests/getaddrinfo.vgtest +++ b/drd/tests/getaddrinfo.vgtest @@ -1,3 +1,3 @@ -prereq: ./supported_libpthread +prereq: ./supported_libpthread && test -e ../../helgrind/tests/getaddrinfo vgopts: -q prog: ../../helgrind/tests/getaddrinfo diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am index 13e2d4db66..3e2efad0be 100755 --- a/helgrind/tests/Makefile.am +++ b/helgrind/tests/Makefile.am @@ -154,7 +154,6 @@ check_PROGRAMS = \ cond_timedwait_invalid \ cond_timedwait_test \ free_is_write \ - getaddrinfo \ hg01_all_ok \ hg02_deadlock \ hg03_inherit \ @@ -239,6 +238,10 @@ check_PROGRAMS += annotate_rwlock annotate_rwlock_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_UNUSED_BUT_SET_VARIABLE@ endif +if HAVE_GETADDRINFO +check_PROGRAMS += getaddrinfo +endif + AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) diff --git a/helgrind/tests/getaddrinfo.vgtest b/helgrind/tests/getaddrinfo.vgtest index b58c618887..9543cbd046 100644 --- a/helgrind/tests/getaddrinfo.vgtest +++ b/helgrind/tests/getaddrinfo.vgtest @@ -1,2 +1,3 @@ +prereq: test -e getaddrinfo prog: getaddrinfo vgopts: -q |