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
(1) |
2
(3) |
3
|
4
|
5
|
6
|
|
7
|
8
(1) |
9
(3) |
10
(2) |
11
(2) |
12
(8) |
13
(5) |
|
14
(2) |
15
|
16
|
17
(4) |
18
(2) |
19
(2) |
20
(1) |
|
21
(2) |
22
(4) |
23
(6) |
24
(2) |
25
|
26
(3) |
27
(1) |
|
28
|
29
(1) |
30
(1) |
|
|
|
|
|
From: Mark W. <ma...@kl...> - 2021-11-17 23:18:10
|
Hi Paul, On Wed, Nov 17, 2021 at 11:13:00PM +0100, Paul Floyd wrote: > I got this from my first attempt at a push: > > paulf> git push > Enumerating objects: 9, done. > Counting objects: 100% (9/9), done. > Delta compression using up to 4 threads > Compressing objects: 100% (5/5), done. > Writing objects: 100% (5/5), 481 bytes | 481.00 KiB/s, done. > Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 > remote: error: unable to unlink old 'docs/manual/mc-manual.html': Permission > denied > To ssh://sourceware.org/git/valgrind-htdocs.git > 59967f7..e2d0a33 main -> main > [...] > A problem with the git hooks? Yes, sorry, it didn't set the file permissions correctly. It should now make sure all files can be updated by someone in the valgrind group. Cheers, Mark |
|
From: Paul F. <pa...@so...> - 2021-11-17 22:20:18
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=f13667b1eff8d3d06590683b9981ced611bd3c69 commit f13667b1eff8d3d06590683b9981ced611bd3c69 Author: Paul Floyd <pj...@wa...> Date: Wed Nov 17 23:15:23 2021 +0100 Bug 445607 Unhandled amd64-freebsd syscall: 247 I can't find much in the way of documentation for this. Added to scalar, but no specific tests. Diff: --- coregrind/m_syswrap/priv_syswrap-freebsd.h | 2 +- coregrind/m_syswrap/syswrap-amd64-freebsd.c | 12 ++++++++++++ coregrind/m_syswrap/syswrap-freebsd.c | 13 +++++++++---- coregrind/m_syswrap/syswrap-x86-freebsd.c | 16 +++++++++++++++- memcheck/tests/freebsd/scalar.c | 4 +++- memcheck/tests/freebsd/scalar.stderr.exp-freebsd130 | 16 ++++++++++++++++ memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 | 16 ++++++++++++++++ 7 files changed, 72 insertions(+), 7 deletions(-) diff --git a/coregrind/m_syswrap/priv_syswrap-freebsd.h b/coregrind/m_syswrap/priv_syswrap-freebsd.h index 348a7fcdbd..0b60467df1 100644 --- a/coregrind/m_syswrap/priv_syswrap-freebsd.h +++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h @@ -227,7 +227,7 @@ DECL_TEMPLATE(freebsd, sys_timer_getoverrun) // 239 // unimpl ffclock_setestimate 242 // unimpl ffclock_getestimate 243 DECL_TEMPLATE(freebsd, sys_clock_nanosleep) // 244 -// unimpl clock_getcpuclockid2 247 +DECL_TEMPLATE(freebsd, sys_clock_getcpuclockid2) // 247 // unimpl ntp_gettime 248 DECL_TEMPLATE(freebsd, sys_minherit) // 250 DECL_TEMPLATE(freebsd, sys_rfork) // 251 diff --git a/coregrind/m_syswrap/syswrap-amd64-freebsd.c b/coregrind/m_syswrap/syswrap-amd64-freebsd.c index 24226fa17c..076f5b4c4d 100644 --- a/coregrind/m_syswrap/syswrap-amd64-freebsd.c +++ b/coregrind/m_syswrap/syswrap-amd64-freebsd.c @@ -290,6 +290,18 @@ PRE(sys_freebsd6_ftruncate) } #endif +// SYS_clock_getcpuclockid2 247 +// no manpage for this, from syscalls.master +// int clock_getcpuclockid2(id_t id, int which, _Out_ clockid_t *clock_id); +PRE(sys_clock_getcpuclockid2) +{ + PRINT("sys_clock_getcpuclockid2( %" FMT_REGWORD "d, %" FMT_REGWORD "d, %#" FMT_REGWORD "x )", + SARG1,SARG2,ARG3); + PRE_REG_READ3(int, "clock_getcpuclockid2", + id_t, id, int, len, clockid_t *, clock_id); + PRE_MEM_WRITE("clock_getcpuclockid2(clock_id)", ARG3, sizeof(vki_clockid_t)); +} + // SYS_rfork 251 // pid_t rfork(int flags); PRE(sys_rfork) diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 6dbf48d557..07f00b497d 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -2438,12 +2438,17 @@ PRE(sys_clock_nanosleep) POST(sys_clock_nanosleep) { if (ARG2 != 0) - PRE_MEM_WRITE( "clock_nanosleep(rmtp)", ARG2, sizeof(struct vki_timespec) ); + POST_MEM_WRITE( ARG2, sizeof(struct vki_timespec) ); } // SYS_clock_getcpuclockid2 247 -// no manpage for this -// @todo +// x86/amd64 + +POST(sys_clock_getcpuclockid2) +{ + POST_MEM_WRITE(ARG3, sizeof(vki_clockid_t)); +} + // SYS_ntp_gettime 248 // int ntp_gettime(struct ntptimeval *); @@ -6519,7 +6524,7 @@ const SyscallTableEntry ML_(syscall_table)[] = { // unimpl SYS_ffclock_getestimate 243 BSDXY(__NR_clock_nanosleep, sys_clock_nanosleep), // 244 - // unimpl SYS_clock_getcpuclockid2 247 + BSDXY(__NR_clock_getcpuclockid2, sys_clock_getcpuclockid2), // 247 // unimpl SYS_ntp_gettime 248 BSDXY(__NR_minherit, sys_minherit), // 250 diff --git a/coregrind/m_syswrap/syswrap-x86-freebsd.c b/coregrind/m_syswrap/syswrap-x86-freebsd.c index d65d0100c4..0c8da316f9 100644 --- a/coregrind/m_syswrap/syswrap-x86-freebsd.c +++ b/coregrind/m_syswrap/syswrap-x86-freebsd.c @@ -1,6 +1,6 @@ /*--------------------------------------------------------------------*/ -/*--- Platform-specific syscalls stuff. syswrap-x86-freebsd.c ---*/ +/*--- Platform-specific syscalls stuff. syswrap-x86-freebsd.c ---*/ /*--------------------------------------------------------------------*/ /* @@ -662,6 +662,20 @@ PRE(sys_freebsd6_ftruncate) } #endif +// SYS_clock_getcpuclockid2 247 +// no manpage for this, from syscalls.master +// int clock_getcpuclockid2(id_t id, int which, _Out_ clockid_t *clock_id); +PRE(sys_clock_getcpuclockid2) +{ + PRINT("sys_clock_getcpuclockid2( %lld, %" FMT_REGWORD "d, %#" FMT_REGWORD "x )", + MERGE64(ARG1,ARG2),SARG3,ARG4); + PRE_REG_READ4(int, "clock_getcpuclockid2", + vki_uint32_t, MERGE64_FIRST(offset), + vki_uint32_t, MERGE64_SECOND(offset), + int, len, clockid_t *, clock_id); + PRE_MEM_WRITE("clock_getcpuclockid2(clock_id)", ARG3, sizeof(vki_clockid_t)); +} + // SYS_rfork 251 // pid_t rfork(int flags); PRE(sys_rfork) diff --git a/memcheck/tests/freebsd/scalar.c b/memcheck/tests/freebsd/scalar.c index ce604df352..3364625c72 100644 --- a/memcheck/tests/freebsd/scalar.c +++ b/memcheck/tests/freebsd/scalar.c @@ -889,7 +889,9 @@ int main(void) SY(SYS_clock_nanosleep, x0+5000, x0+3000, x0, x0+1); SUCC; #endif - // unimpl SYS_clock_getcpuclockid2 247 + // SYS_clock_getcpuclockid2 247 + GO(SYS_clock_getcpuclockid2, "3s 1m"); + SY(SYS_clock_getcpuclockid2, x0+1, x0+1, x0+1); FAIL; // BSDXY(__NR_ntp_gettime, sys_ntp_gettime), // 248 diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130 b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130 index 3a74760bd5..309749f072 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130 @@ -1890,6 +1890,22 @@ Syscall param clock_nanosleep(rmtp) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +247:SYS_clock_getcpuclockid2 3s 1m +--------------------------------------------------------- +Syscall param clock_getcpuclockid2(id) contains uninitialised byte(s) + ... + +Syscall param clock_getcpuclockid2(len) contains uninitialised byte(s) + ... + +Syscall param clock_getcpuclockid2(clock_id) contains uninitialised byte(s) + ... + +Syscall param clock_getcpuclockid2(clock_id) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 250: SYS_minherit @todo --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 index 8d587d4537..62ed782c5f 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 @@ -1890,6 +1890,22 @@ Syscall param clock_nanosleep(rmtp) points to unaddressable byte(s) ... Address 0x........ is not stack'd, malloc'd or (recently) free'd +--------------------------------------------------------- +247:SYS_clock_getcpuclockid2 3s 1m +--------------------------------------------------------- +Syscall param clock_getcpuclockid2(offset_low) contains uninitialised byte(s) + ... + +Syscall param clock_getcpuclockid2(offset_high) contains uninitialised byte(s) + ... + +Syscall param clock_getcpuclockid2(len) contains uninitialised byte(s) + ... + +Syscall param clock_getcpuclockid2(clock_id) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + --------------------------------------------------------- 250: SYS_minherit @todo --------------------------------------------------------- |
|
From: Paul F. <pj...@wa...> - 2021-11-17 22:13:11
|
On 11/17/21 12:29, Mark Wielaard wrote: > Hi valgrind hackers, > > We moved the website into git: > https://sourceware.org/git/valgrind-htdocs.git > And the website itself is now hosted by sourceware.org. > > If you have commit access to the main valgrind.git repo you should also > have commit access to the valgrind-htdocs.git repository (through ssh). > > The website https://valgrind.org/ updates immediately when you push new > commits to valgrind-htdocs.git. > > This might be a good time to review the Developers page: > https://valgrind.org/info/developers.html > and see if you are mentioned, update your bio, etc. > Please try and update it and ask if you have any problems. > > Also please point out any documentation (either on the website or in > the main repo) that might need updating for the new way we update the > website. > > Thanks, Hi Mark I got this from my first attempt at a push: paulf> git push Enumerating objects: 9, done. Counting objects: 100% (9/9), done. Delta compression using up to 4 threads Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 481 bytes | 481.00 KiB/s, done. Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 remote: error: unable to unlink old 'docs/manual/mc-manual.html': Permission den ied To ssh://sourceware.org/git/valgrind-htdocs.git 59967f7..e2d0a33 main -> main euler:/home/paulf/scratch/valgrind-htdocs And similarly a second push paulf> git push Enumerating objects: 9, done. Counting objects: 100% (9/9), done. Delta compression using up to 4 threads Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 692 bytes | 692.00 KiB/s, done. Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 remote: error: unable to unlink old 'docs/manual/mc-manual.html': Permission den ied remote: error: unable to unlink old 'info/developers.html': Permission denied remote: error: unable to unlink old 'info/platforms.html': Permission denied To ssh://sourceware.org/git/valgrind-htdocs.git e2d0a33..8dab11d main -> main If I make a separate clone, my changes are there. A problem with the git hooks? A+ Paul |
|
From: Mark W. <ma...@kl...> - 2021-11-17 11:29:26
|
Hi valgrind hackers, We moved the website into git: https://sourceware.org/git/valgrind-htdocs.git And the website itself is now hosted by sourceware.org. If you have commit access to the main valgrind.git repo you should also have commit access to the valgrind-htdocs.git repository (through ssh). The website https://valgrind.org/ updates immediately when you push new commits to valgrind-htdocs.git. This might be a good time to review the Developers page: https://valgrind.org/info/developers.html and see if you are mentioned, update your bio, etc. Please try and update it and ask if you have any problems. Also please point out any documentation (either on the website or in the main repo) that might need updating for the new way we update the website. Thanks, Mark |
|
From: Paul F. <pa...@so...> - 2021-11-14 21:08:01
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=83dda2b71a75bd0058ed50a32ec871b083a96f91 commit 83dda2b71a75bd0058ed50a32ec871b083a96f91 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 14 22:06:14 2021 +0100 Bug 444925 fexecve syscall wrapper not properly implemented Implement fexecve and a few testcases on FreeBSD. Diff: --- .gitignore | 3 + coregrind/m_libcfile.c | 28 +++++++++ coregrind/m_syswrap/priv_syswrap-generic.h | 8 ++- coregrind/m_syswrap/syswrap-freebsd.c | 72 +++++++++++++++++++++- coregrind/m_syswrap/syswrap-generic.c | 21 +++++-- coregrind/m_syswrap/syswrap-linux.c | 2 +- coregrind/pub_core_libcfile.h | 5 ++ include/vki/vki-freebsd.h | 6 ++ memcheck/tests/freebsd/Makefile.am | 6 +- memcheck/tests/freebsd/fexecve.c | 34 ++++++++++ memcheck/tests/freebsd/fexecve.stderr.exp | 18 ++++++ memcheck/tests/freebsd/fexecve.vgtest | 2 + memcheck/tests/freebsd/scalar.stderr.exp | 8 --- .../tests/freebsd/scalar.stderr.exp-freebsd130 | 8 --- .../tests/freebsd/scalar.stderr.exp-freebsd130-x86 | 8 --- memcheck/tests/freebsd/scalar.stderr.exp-x86 | 8 --- none/tests/freebsd/Makefile.am | 20 +++++- none/tests/freebsd/fexecve.c | 53 ++++++++++++++++ none/tests/freebsd/fexecve_hw1.stderr.exp | 0 none/tests/freebsd/fexecve_hw1.stdout.exp | 1 + none/tests/freebsd/fexecve_hw1.vgtest | 5 ++ none/tests/freebsd/fexecve_hw2.stderr.exp | 0 none/tests/freebsd/fexecve_hw2.stdout.exp | 1 + none/tests/freebsd/fexecve_hw2.vgtest | 5 ++ none/tests/freebsd/fexecve_script1.stderr.exp | 1 + none/tests/freebsd/fexecve_script1.vgtest | 4 ++ none/tests/freebsd/fexecve_script2.stderr.exp | 0 none/tests/freebsd/fexecve_script2.stdout.exp | 1 + none/tests/freebsd/fexecve_script2.vgtest | 4 ++ none/tests/freebsd/fexecve_txt.stderr.exp | 1 + none/tests/freebsd/fexecve_txt.vgtest | 4 ++ none/tests/freebsd/hello_world.cpp | 6 ++ none/tests/freebsd/test.sh | 2 + 33 files changed, 297 insertions(+), 48 deletions(-) diff --git a/.gitignore b/.gitignore index 770d08c278..5ab4d74ebe 100644 --- a/.gitignore +++ b/.gitignore @@ -1330,6 +1330,7 @@ /memcheck/tests/freebsd/get_set_context /memcheck/tests/freebsd/utimes /memcheck/tests/freebsd/static_allocs +/memcheck/tests/freebsd/fexecve # /memcheck/tests/amd64-freebsd /memcheck/tests/amd64-freebsd/*.stderr.diff @@ -2051,6 +2052,8 @@ /none/tests/freebsd/auxv /none/tests/freebsd/osrel /none/tests/freebsd/swapcontext +/none/tests/freebsd/fexecve +/none/tests/freebsd/hello_world # /none/tests/x86/ /none/tests/x86/*.dSYM diff --git a/coregrind/m_libcfile.c b/coregrind/m_libcfile.c index 598027c6d9..5f9c76efe5 100644 --- a/coregrind/m_libcfile.c +++ b/coregrind/m_libcfile.c @@ -179,6 +179,34 @@ Bool VG_(resolve_filename) ( Int fd, const HChar** result ) # endif } +#if defined(VGO_freebsd) + +/* This should only be called after a successful call to + * Bool VG_(resolve_filename) ( Int fd, const HChar** result ) + * so that filedesc_buf is still valid for fd */ +Bool VG_(resolve_filemode) ( Int fd, Int * result ) +{ + Char *bp, *eb; + struct vki_kinfo_file *kf; + + /* Walk though the list. */ + bp = filedesc_buf; + eb = filedesc_buf + sizeof(filedesc_buf); + while (bp < eb) { + kf = (struct vki_kinfo_file *)bp; + if (kf->kf_fd == fd) + break; + bp += kf->kf_structsize; + } + if (bp >= eb) + *result = -1; + else + *result = kf->kf_flags; + return True; +} +#endif + + SysRes VG_(mknod) ( const HChar* pathname, Int mode, UWord dev ) { # if defined(VGP_arm64_linux) || defined(VGP_nanomips_linux) diff --git a/coregrind/m_syswrap/priv_syswrap-generic.h b/coregrind/m_syswrap/priv_syswrap-generic.h index c50b313999..5d2709adb7 100644 --- a/coregrind/m_syswrap/priv_syswrap-generic.h +++ b/coregrind/m_syswrap/priv_syswrap-generic.h @@ -127,9 +127,15 @@ void handle_sys_pwritev(ThreadId tid, SyscallStatus* status, Int fd, Addr vector, Int count, const char *str); +typedef enum { + EXECVE, + EXECVEAT, + FEXECVE +} ExecveType; + extern void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, - Addr arg_2, Addr arg_3, Bool is_execveat, + Addr arg_2, Addr arg_3, ExecveType execveType, Bool check_pathptr); DECL_TEMPLATE(generic, sys_ni_syscall); // * P -- unimplemented diff --git a/coregrind/m_syswrap/syswrap-freebsd.c b/coregrind/m_syswrap/syswrap-freebsd.c index 77f5b30dd6..6dbf48d557 100644 --- a/coregrind/m_syswrap/syswrap-freebsd.c +++ b/coregrind/m_syswrap/syswrap-freebsd.c @@ -4898,11 +4898,77 @@ PRE(sys_fexecve) { PRINT("sys_fexecve ( %" FMT_REGWORD "d, %#" FMT_REGWORD "x, %#" FMT_REGWORD "x )", SARG1,ARG2,ARG3); - PRE_REG_READ3(long, "fexecve", + PRE_REG_READ3(int, "fexecve", int, fd, char * const *, argv, char * const *, envp); - PRE_MEM_RASCIIZ( "fexecve(argv)", ARG2 ); - PRE_MEM_RASCIIZ( "fexecve(envp)", ARG3 ); + + if (!ML_(fd_allowed)(ARG1, "fexecve", tid, False)) { + SET_STATUS_Failure(VKI_EBADF); + return; + } + + const HChar *fname; + + if (VG_(resolve_filename)(ARG1, &fname) == False) { + SET_STATUS_Failure(VKI_ENOENT); + return; + } + + struct vg_stat stats; + if (VG_(fstat)(ARG1, &stats) != 0) { + SET_STATUS_Failure(VKI_EACCES); + return; + } + + Int openFlags; + + if (VG_(resolve_filemode)(ARG1, &openFlags) == False) { + SET_STATUS_Failure(VKI_ENOENT); + return; + } + + /* + * openFlags is in kernel FFLAGS format + * (see /usr/include/sys/fcntl.h) + * which alllows us to tell if RDONLY is set + * + */ + + Bool isScript = False; + + SysRes res; + res = VG_(open)(fname, VKI_O_RDONLY, + VKI_S_IRUSR|VKI_S_IRGRP|VKI_S_IROTH); + if (sr_isError(res)) { + SET_STATUS_Failure(VKI_ENOENT); + return; + } else { + char buf[2]; + VG_(read)((Int)sr_Res(res), buf, 2); + VG_(close)((Int)sr_Res(res)); + if (buf[0] == '#' && buf[1] == '!') + { + isScript = True; + } + } + + if (isScript) { + if (!(openFlags & VKI_FREAD)) { + SET_STATUS_Failure(VKI_EACCES); + return; + } + } else { + if (!((openFlags & VKI_O_EXEC) || + (stats.mode & (VKI_S_IXUSR|VKI_S_IXGRP|VKI_S_IXOTH)))) { + SET_STATUS_Failure(VKI_EACCES); + return; + } + } + + Addr arg_2 = (Addr)ARG2; + Addr arg_3 = (Addr)ARG3; + + handle_pre_sys_execve(tid, status, (Addr)fname, arg_2, arg_3, FEXECVE, False); } // SYS_freebsd11_fstatat 493 diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index b1b982cc4a..bc3fa6fe9f 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -2919,7 +2919,7 @@ void VG_(reap_threads)(ThreadId self) /* This handles the common part of the PRE macro for execve and execveat. */ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, - Addr arg_2, Addr arg_3, Bool is_execveat, + Addr arg_2, Addr arg_3, ExecveType execveType, Bool check_pathptr) { HChar* path = NULL; /* path to executable */ @@ -2934,10 +2934,19 @@ void handle_pre_sys_execve(ThreadId tid, SyscallStatus *status, Addr pathname, const char *str; char str2[30], str3[30]; - if (is_execveat) - str = "execveat"; - else - str = "execve"; + switch (execveType) { + case EXECVE: + str = "execve"; + break; + case EXECVEAT: + str = "execveat"; + break; + case FEXECVE: + str = "fexecve"; + break; + default: + vg_assert(False); + } VG_(strcpy)(str2, str); VG_(strcpy)(str3, str); @@ -3230,7 +3239,7 @@ PRE(sys_execve) Addr arg_2 = (Addr)ARG2; Addr arg_3 = (Addr)ARG3; - handle_pre_sys_execve(tid, status, (Addr)pathname, arg_2, arg_3, 0, True); + handle_pre_sys_execve(tid, status, (Addr)pathname, arg_2, arg_3, EXECVE, True); } PRE(sys_access) diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 50203eca09..ac2a9f0c36 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -13332,7 +13332,7 @@ PRE(sys_execveat) return; } - handle_pre_sys_execve(tid, status, (Addr) path, arg_2, arg_3, 1, + handle_pre_sys_execve(tid, status, (Addr) path, arg_2, arg_3, EXECVEAT, check_pathptr); /* The exec failed, we keep running... cleanup. */ diff --git a/coregrind/pub_core_libcfile.h b/coregrind/pub_core_libcfile.h index 28f3e8c960..56289a494c 100644 --- a/coregrind/pub_core_libcfile.h +++ b/coregrind/pub_core_libcfile.h @@ -44,6 +44,11 @@ extern Int VG_(fcntl) ( Int fd, Int cmd, Addr arg ); /* Convert an fd into a filename */ extern Bool VG_(resolve_filename) ( Int fd, const HChar** buf ); +#if defined(VGO_freebsd) +/* get the flags used to obtain an fd */ +extern Bool VG_(resolve_filemode) ( Int fd, Int * result ); +#endif + /* Return the size of a file, or -1 in case of error */ extern Long VG_(fsize) ( Int fd ); diff --git a/include/vki/vki-freebsd.h b/include/vki/vki-freebsd.h index 4cf7b5aebb..b0036679ed 100644 --- a/include/vki/vki-freebsd.h +++ b/include/vki/vki-freebsd.h @@ -1536,11 +1536,17 @@ struct vki_dirent { #define VKI_O_WRONLY O_WRONLY #define VKI_O_RDWR O_RDWR +#define VKI_FREAD FREAD +#define VKI_WRITE WRITE + #define VKI_O_NONBLOCK O_NONBLOCK #define VKI_O_APPEND O_APPEND #define VKI_O_CREAT O_CREAT #define VKI_O_TRUNC O_TRUNC #define VKI_O_EXCL O_EXCL +#define VKI_O_DIRECTORY O_DIRECTORY +#define VKI_O_EXEC O_EXEC +#define VKI_O_SEARCH O_EXEC #define VKI_AT_FDCWD AT_FDCWD diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index d0e6c6cc25..f72cc2720e 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -71,14 +71,16 @@ EXTRA_DIST = \ utimes.stderr.exp-x86 \ utimes.stderr.exp \ static_allocs.vgtest \ - static_allocs.stderr.exp + static_allocs.stderr.exp \ + fexecve.vgtest \ + fexecve.stderr.exp check_PROGRAMS = \ statfs pdfork_pdkill getfsstat inlinfo inlinfo_nested.so extattr \ sigwait chflags get_set_login revoke scalar capsicum getfh \ linkat scalar_fork scalar_thr_exit scalar_abort2 scalar_pdfork \ scalar_vfork stat file_locking_wait6 utimens access chmod_chown \ - misc get_set_context utimes static_allocs + misc get_set_context utimes static_allocs fexecve AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) diff --git a/memcheck/tests/freebsd/fexecve.c b/memcheck/tests/freebsd/fexecve.c new file mode 100644 index 0000000000..6fe62ed597 --- /dev/null +++ b/memcheck/tests/freebsd/fexecve.c @@ -0,0 +1,34 @@ +#include <fcntl.h> // open +#include <stdio.h> // perror +#include <string.h> // strdup +#include <stdlib.h> // exit +#include <unistd.h> // fexecve + +int main(int argc, char **argv, char** envp) +{ + char *exe = "/usr/bin/true"; + + int fd = open(exe, O_RDONLY); + if (-1 == fd) + { + perror("open failed:"); + exit(-1); + } + char ** new_argv = malloc(2*sizeof(char *)); + char ** new_envp = malloc(2*sizeof(char *)); + char * arg1 = strdup("./fexecve"); + char * env1 = strdup("FOO=bar"); + int * new_fd = malloc(sizeof(int)); + *new_fd += fd; + new_argv[1] = new_envp[1] = NULL; + argv[0] = arg1; + envp[0] = env1; + + free(arg1); + free(env1); + if (-1 == fexecve(*new_fd, new_argv, new_envp)) + { + perror("fexecv failed:"); + exit(-1); + } +} diff --git a/memcheck/tests/freebsd/fexecve.stderr.exp b/memcheck/tests/freebsd/fexecve.stderr.exp new file mode 100644 index 0000000000..1b4da10d00 --- /dev/null +++ b/memcheck/tests/freebsd/fexecve.stderr.exp @@ -0,0 +1,18 @@ +Syscall param fexecve(fd) contains uninitialised byte(s) + at 0x........: fexecve (in /...libc...) + by 0x........: main (fexecve.c:29) + +Syscall param fexecve(argv) points to uninitialised byte(s) + at 0x........: fexecve (in /...libc...) + by 0x........: main (fexecve.c:29) + Address 0x........ is 0 bytes inside a block of size 16 alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (fexecve.c:17) + +Syscall param fexecve(envp) points to uninitialised byte(s) + at 0x........: fexecve (in /...libc...) + by 0x........: main (fexecve.c:29) + Address 0x........ is 0 bytes inside a block of size 16 alloc'd + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (fexecve.c:18) + diff --git a/memcheck/tests/freebsd/fexecve.vgtest b/memcheck/tests/freebsd/fexecve.vgtest new file mode 100644 index 0000000000..2ba2b646ca --- /dev/null +++ b/memcheck/tests/freebsd/fexecve.vgtest @@ -0,0 +1,2 @@ +prog: fexecve +vgopts: -q diff --git a/memcheck/tests/freebsd/scalar.stderr.exp b/memcheck/tests/freebsd/scalar.stderr.exp index 7f0227083b..3f16d12d61 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp +++ b/memcheck/tests/freebsd/scalar.stderr.exp @@ -3941,14 +3941,6 @@ Syscall param fexecve(argv) contains uninitialised byte(s) Syscall param fexecve(envp) contains uninitialised byte(s) ... -Syscall param fexecve(argv) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param fexecve(envp) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - --------------------------------------------------------- 493: SYS_freebsd11_fstatat 4s 2m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130 b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130 index 3dabebaea8..3a74760bd5 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130 @@ -3941,14 +3941,6 @@ Syscall param fexecve(argv) contains uninitialised byte(s) Syscall param fexecve(envp) contains uninitialised byte(s) ... -Syscall param fexecve(argv) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param fexecve(envp) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - --------------------------------------------------------- 493: SYS_freebsd11_fstatat 4s 2m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 index 5770eb5f58..8d587d4537 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 @@ -3972,14 +3972,6 @@ Syscall param fexecve(argv) contains uninitialised byte(s) Syscall param fexecve(envp) contains uninitialised byte(s) ... -Syscall param fexecve(argv) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param fexecve(envp) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - --------------------------------------------------------- 493: SYS_freebsd11_fstatat 4s 2m --------------------------------------------------------- diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-x86 index 3679c1cae7..b949dbb7e8 100644 --- a/memcheck/tests/freebsd/scalar.stderr.exp-x86 +++ b/memcheck/tests/freebsd/scalar.stderr.exp-x86 @@ -3972,14 +3972,6 @@ Syscall param fexecve(argv) contains uninitialised byte(s) Syscall param fexecve(envp) contains uninitialised byte(s) ... -Syscall param fexecve(argv) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - -Syscall param fexecve(envp) points to unaddressable byte(s) - ... - Address 0x........ is not stack'd, malloc'd or (recently) free'd - --------------------------------------------------------- 493: SYS_freebsd11_fstatat 4s 2m --------------------------------------------------------- diff --git a/none/tests/freebsd/Makefile.am b/none/tests/freebsd/Makefile.am index dbcf32465e..f3dabc9a9b 100644 --- a/none/tests/freebsd/Makefile.am +++ b/none/tests/freebsd/Makefile.am @@ -1,7 +1,7 @@ include $(top_srcdir)/Makefile.tool-tests.am -dist_noinst_SCRIPTS = filter_stderr +dist_noinst_SCRIPTS = filter_stderr test.sh EXTRA_DIST = \ auxv.vgtest \ auxv.stderr.exp \ @@ -12,10 +12,23 @@ EXTRA_DIST = \ osrel.stdout.exp \ swapcontext.vgtest \ swapcontext.stderr.exp \ - swapcontext.stdout.exp + swapcontext.stdout.exp \ + fexecve_hw1.vgtest \ + fexecve_hw1.stdout.exp \ + fexecve_hw1.stderr.exp \ + fexecve_hw2.vgtest \ + fexecve_hw2.stdout.exp \ + fexecve_hw2.stderr.exp \ + fexecve_script1.vgtest \ + fexecve_script1.stderr.exp \ + fexecve_script2.vgtest \ + fexecve_script2.stdout.exp \ + fexecve_script2.stderr.exp \ + fexecve_txt.vgtest \ + fexecve_txt.stderr.exp check_PROGRAMS = \ - auxv osrel swapcontext + auxv osrel swapcontext hello_world fexecve AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) @@ -24,3 +37,4 @@ auxv_CFLAGS = ${AM_CFLAGS} osrel_CFLAGS = ${AM_CFLAGS} swapcontext_CFLAGS = ${AM_CFLAGS} +hello_world_SOURCES = hello_world.cpp diff --git a/none/tests/freebsd/fexecve.c b/none/tests/freebsd/fexecve.c new file mode 100644 index 0000000000..d91f090d04 --- /dev/null +++ b/none/tests/freebsd/fexecve.c @@ -0,0 +1,53 @@ +#include <fcntl.h> // open +#include <stdio.h> // perror +#include <unistd.h> // getopt +#include <stdlib.h> // exit + +int main(int argc, char **argv, char** envp) +{ + char *exe = "./hello_world"; + int open_flags = 0; + int opt; + + while ((opt = getopt(argc, argv, "erst")) != -1) + { + switch (opt) + { + case 'e': + open_flags |= O_EXEC; + break; + case 'r': + open_flags |= O_RDONLY; + break; + case 's': + exe = "./test.sh"; + break; + case 't': + exe = "./fexecve.c"; + break; + default: + fprintf(stderr, "bad usage, options are\n" + "\texec flag\t-e\n" + "\trdonly flag\t-r\n" + "\texec script\t-s\n" + "\ntext file\n-t"); + exit(-1); + } + } + + int fd = open(exe, open_flags); + if (-1 == fd) + { + perror("open failed:"); + exit(-1); + } + char *new_argv[] = { + exe, + NULL + }; + if (-1 == fexecve(fd, new_argv, envp)) + { + perror("fexecv failed:"); + exit(-1); + } +} diff --git a/none/tests/freebsd/fexecve_hw1.stderr.exp b/none/tests/freebsd/fexecve_hw1.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/none/tests/freebsd/fexecve_hw1.stdout.exp b/none/tests/freebsd/fexecve_hw1.stdout.exp new file mode 100644 index 0000000000..428e0de9af --- /dev/null +++ b/none/tests/freebsd/fexecve_hw1.stdout.exp @@ -0,0 +1 @@ +Compiled Hello, World! diff --git a/none/tests/freebsd/fexecve_hw1.vgtest b/none/tests/freebsd/fexecve_hw1.vgtest new file mode 100644 index 0000000000..9f6bca7267 --- /dev/null +++ b/none/tests/freebsd/fexecve_hw1.vgtest @@ -0,0 +1,5 @@ +prereq: test -e hello_world +prog: fexecve +args: -r -e +vgopts: -q + diff --git a/none/tests/freebsd/fexecve_hw2.stderr.exp b/none/tests/freebsd/fexecve_hw2.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/none/tests/freebsd/fexecve_hw2.stdout.exp b/none/tests/freebsd/fexecve_hw2.stdout.exp new file mode 100644 index 0000000000..428e0de9af --- /dev/null +++ b/none/tests/freebsd/fexecve_hw2.stdout.exp @@ -0,0 +1 @@ +Compiled Hello, World! diff --git a/none/tests/freebsd/fexecve_hw2.vgtest b/none/tests/freebsd/fexecve_hw2.vgtest new file mode 100644 index 0000000000..386d398bf7 --- /dev/null +++ b/none/tests/freebsd/fexecve_hw2.vgtest @@ -0,0 +1,5 @@ +prereq: test -e hello_world +prog: fexecve +args: -e +vgopts: -q + diff --git a/none/tests/freebsd/fexecve_script1.stderr.exp b/none/tests/freebsd/fexecve_script1.stderr.exp new file mode 100644 index 0000000000..1de0dc20b7 --- /dev/null +++ b/none/tests/freebsd/fexecve_script1.stderr.exp @@ -0,0 +1 @@ +fexecv failed:: Permission denied diff --git a/none/tests/freebsd/fexecve_script1.vgtest b/none/tests/freebsd/fexecve_script1.vgtest new file mode 100644 index 0000000000..a6c3124a40 --- /dev/null +++ b/none/tests/freebsd/fexecve_script1.vgtest @@ -0,0 +1,4 @@ +prog: fexecve +args: -r -e -s +vgopts: -q + diff --git a/none/tests/freebsd/fexecve_script2.stderr.exp b/none/tests/freebsd/fexecve_script2.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/none/tests/freebsd/fexecve_script2.stdout.exp b/none/tests/freebsd/fexecve_script2.stdout.exp new file mode 100644 index 0000000000..cd79766ac0 --- /dev/null +++ b/none/tests/freebsd/fexecve_script2.stdout.exp @@ -0,0 +1 @@ +Script Hello, World! diff --git a/none/tests/freebsd/fexecve_script2.vgtest b/none/tests/freebsd/fexecve_script2.vgtest new file mode 100644 index 0000000000..fb65f76536 --- /dev/null +++ b/none/tests/freebsd/fexecve_script2.vgtest @@ -0,0 +1,4 @@ +prog: fexecve +args: -r -s +vgopts: -q + diff --git a/none/tests/freebsd/fexecve_txt.stderr.exp b/none/tests/freebsd/fexecve_txt.stderr.exp new file mode 100644 index 0000000000..1de0dc20b7 --- /dev/null +++ b/none/tests/freebsd/fexecve_txt.stderr.exp @@ -0,0 +1 @@ +fexecv failed:: Permission denied diff --git a/none/tests/freebsd/fexecve_txt.vgtest b/none/tests/freebsd/fexecve_txt.vgtest new file mode 100644 index 0000000000..0c52b7421c --- /dev/null +++ b/none/tests/freebsd/fexecve_txt.vgtest @@ -0,0 +1,4 @@ +prog: fexecve +args: -r -t +vgopts: -q + diff --git a/none/tests/freebsd/hello_world.cpp b/none/tests/freebsd/hello_world.cpp new file mode 100644 index 0000000000..f5648b97a6 --- /dev/null +++ b/none/tests/freebsd/hello_world.cpp @@ -0,0 +1,6 @@ +#include <iostream> + +int main() +{ + std::cout << "Compiled Hello, World!\n"; +} diff --git a/none/tests/freebsd/test.sh b/none/tests/freebsd/test.sh new file mode 100755 index 0000000000..51b25d60ec --- /dev/null +++ b/none/tests/freebsd/test.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo Script Hello, World! |
|
From: Paul F. <pa...@so...> - 2021-11-14 15:44:36
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=5f8211aa603c173f5ca6049e9fde2bf460fb3758 commit 5f8211aa603c173f5ca6049e9fde2bf460fb3758 Author: Paul Floyd <pj...@wa...> Date: Sun Nov 14 16:42:31 2021 +0100 Add a FreeBSD suppression for fun:_malloc_postfork This was causing drd/tests/fork-parallel to fail intermittently. It's due to the use of a jemalloc-specific mutex. Diff: --- freebsd-drd.supp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/freebsd-drd.supp b/freebsd-drd.supp index a3414b544a..f2234600b6 100644 --- a/freebsd-drd.supp +++ b/freebsd-drd.supp @@ -168,3 +168,10 @@ fun:_ZNSt3__15mutexD1Ev fun:__cxa_finalize } +{ + DRD-FREEBSD130-JEMALLOC + drd:ConflictingAccess + obj:*/lib*/libc.so.7 + obj:*/lib*/libc.so.7 + fun:_malloc_postfork +} |
|
From: Julian S. <se...@so...> - 2021-11-13 19:00:41
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=595341b150312d2407bd43304449bf39ec3e1fa8 commit 595341b150312d2407bd43304449bf39ec3e1fa8 Author: Julian Seward <js...@ac...> Date: Sat Nov 13 19:59:07 2021 +0100 amd64 front end: add more spec rules: S after SHRQ Z after SHLQ NZ after SHLQ Z after SHLL S after SHLL The lack of at least one of these was observed to cause occasional false positives in Memcheck. Plus add commented-out cases so as to complete the set of 12 rules {Z,NZ,S,NS} after {SHRQ,SHLQ,SHLL}. The commented-out ones are commented out because I so far didn't find any use cases for them. Diff: --- VEX/priv/guest_amd64_helpers.c | 60 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/VEX/priv/guest_amd64_helpers.c b/VEX/priv/guest_amd64_helpers.c index 9d61e7a0fd..ba71c1b62f 100644 --- a/VEX/priv/guest_amd64_helpers.c +++ b/VEX/priv/guest_amd64_helpers.c @@ -1823,16 +1823,26 @@ IRExpr* guest_amd64_spechelper ( const HChar* function_name, /*---------------- SHRQ ----------------*/ if (isU64(cc_op, AMD64G_CC_OP_SHRQ) && isU64(cond, AMD64CondZ)) { - /* SHRQ, then Z --> test dep1 == 0 */ + /* SHRQ, then Z --> test result[63:0] == 0 */ return unop(Iop_1Uto64, binop(Iop_CmpEQ64, cc_dep1, mkU64(0))); } if (isU64(cc_op, AMD64G_CC_OP_SHRQ) && isU64(cond, AMD64CondNZ)) { - /* SHRQ, then NZ --> test dep1 != 0 */ + /* SHRQ, then NZ --> test result[63:0] != 0 */ return unop(Iop_1Uto64, binop(Iop_CmpNE64, cc_dep1, mkU64(0))); } + if (isU64(cc_op, AMD64G_CC_OP_SHRQ) && isU64(cond, AMD64CondS)) { + /* SHRQ, then S --> (ULong)result[63] (result is in dep1) */ + return binop(Iop_Shr64, cc_dep1, mkU8(63)); + } + // No known test case for this, hence disabled: + //if (isU64(cc_op, AMD64G_CC_OP_SHRQ) && isU64(cond, AMD64CondNS)) { + // /* SHRQ, then NS --> (ULong) ~ result[63] */ + // vassert(0); + //} + /*---------------- SHRL ----------------*/ if (isU64(cc_op, AMD64G_CC_OP_SHRL) && isU64(cond, AMD64CondZ)) { @@ -1881,6 +1891,52 @@ IRExpr* guest_amd64_spechelper ( const HChar* function_name, // mkU32(0))); //} + /*---------------- SHLQ ----------------*/ + + if (isU64(cc_op, AMD64G_CC_OP_SHLQ) && isU64(cond, AMD64CondZ)) { + /* SHLQ, then Z --> test dep1 == 0 */ + return unop(Iop_1Uto64, + binop(Iop_CmpEQ64, cc_dep1, mkU64(0))); + } + if (isU64(cc_op, AMD64G_CC_OP_SHLQ) && isU64(cond, AMD64CondNZ)) { + /* SHLQ, then NZ --> test dep1 != 0 */ + return unop(Iop_1Uto64, + binop(Iop_CmpNE64, cc_dep1, mkU64(0))); + } + + //if (isU64(cc_op, AMD64G_CC_OP_SHLQ) && isU64(cond, AMD64CondS)) { + // /* SHLQ, then S --> (ULong)result[63] */ + // vassert(0); + //} + //if (isU64(cc_op, AMD64G_CC_OP_SHLQ) && isU64(cond, AMD64CondNS)) { + // /* SHLQ, then NS --> (ULong) ~ result[63] */ + // vassert(0); + //} + + /*---------------- SHLL ----------------*/ + + if (isU64(cc_op, AMD64G_CC_OP_SHLL) && isU64(cond, AMD64CondZ)) { + /* SHLL, then Z --> test result[31:0] == 0 */ + return unop(Iop_1Uto64, + binop(Iop_CmpEQ32, unop(Iop_64to32, cc_dep1), + mkU32(0))); + } + //if (isU64(cc_op, AMD64G_CC_OP_SHLL) && isU64(cond, AMD64CondNZ)) { + // /* SHLL, then NZ --> test dep1 != 0 */ + // vassert(0); + //} + + if (isU64(cc_op, AMD64G_CC_OP_SHLL) && isU64(cond, AMD64CondS)) { + /* SHLL, then S --> (ULong)result[31] */ + return binop(Iop_And64, + binop(Iop_Shr64, cc_dep1, mkU8(31)), + mkU64(1)); + } + //if (isU64(cc_op, AMD64G_CC_OP_SHLL) && isU64(cond, AMD64CondNS)) { + // /* SHLL, then NS --> (ULong) ~ result[31] */ + // vassert(0); + //} + /*---------------- COPY ----------------*/ /* This can happen, as a result of amd64 FP compares: "comisd ... ; jbe" for example. */ |
|
From: Paul F. <pa...@so...> - 2021-11-13 17:11:00
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4fd9bd3ed02db5a837fe734e1d525ab222053d9f commit 4fd9bd3ed02db5a837fe734e1d525ab222053d9f Author: Paul Floyd <pj...@wa...> Date: Sat Nov 13 18:09:20 2021 +0100 Remove a default suppession for GCC/libstdc++ This is covered by cxx-freeres Diff: --- freebsd.supp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/freebsd.supp b/freebsd.supp index 7f9b22bb30..b86b800d80 100644 --- a/freebsd.supp +++ b/freebsd.supp @@ -17,17 +17,6 @@ obj:/libexec/ld-elf32.so.1 obj:/libexec/ld-elf32.so.1 } - -{ - MEMCHECK-LIBSTDC++-REACHABLE - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc - obj:/usr/local/lib*/gcc*/libstdc++.so.* - obj:/libexec/ld-elf*.so.1 - obj:/libexec/ld-elf*.so.1 - obj:/libexec/ld-elf*.so.1 -} { MEMCHECK-LIBC-REACHABLE-1 Memcheck:Leak |
|
From: Paul F. <pa...@so...> - 2021-11-13 11:33:26
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=39b4bbe3a1e48f9363351bc76f787b2c82a566b4 commit 39b4bbe3a1e48f9363351bc76f787b2c82a566b4 Author: Paul Floyd <pj...@wa...> Date: Sat Nov 13 12:31:41 2021 +0100 Bugs 435732 and 403802 again This time with debuginfo removed. Also update the vgtest files for a couple of massif tests (and also the expected because of the commmand line change). Not yet tested these two with debuginfo installed. Diff: --- massif/tests/new-cpp.post.exp | 2 +- massif/tests/new-cpp.vgtest | 1 + massif/tests/overloaded-new.post.exp | 2 +- massif/tests/overloaded-new.vgtest | 1 + memcheck/tests/libstdc++.supp | 23 +++++++++-------------- 5 files changed, 13 insertions(+), 16 deletions(-) diff --git a/massif/tests/new-cpp.post.exp b/massif/tests/new-cpp.post.exp index 9d90cf6c22..5935771617 100644 --- a/massif/tests/new-cpp.post.exp +++ b/massif/tests/new-cpp.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./new-cpp -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 --ignore-fn=call_init ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/new-cpp.vgtest b/massif/tests/new-cpp.vgtest index 88bdf939b9..ebcef897a0 100644 --- a/massif/tests/new-cpp.vgtest +++ b/massif/tests/new-cpp.vgtest @@ -2,5 +2,6 @@ prog: new-cpp vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook vgopts: --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 +vgopts: --ignore-fn=call_init post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses cleanup: rm massif.out diff --git a/massif/tests/overloaded-new.post.exp b/massif/tests/overloaded-new.post.exp index e55885fc57..ae112710b7 100644 --- a/massif/tests/overloaded-new.post.exp +++ b/massif/tests/overloaded-new.post.exp @@ -1,6 +1,6 @@ -------------------------------------------------------------------------------- Command: ./overloaded-new -Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 +Massif arguments: --stacks=no --time-unit=B --massif-out-file=massif.out --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 --ignore-fn=call_init ms_print arguments: massif.out -------------------------------------------------------------------------------- diff --git a/massif/tests/overloaded-new.vgtest b/massif/tests/overloaded-new.vgtest index 20bcd97e62..fc95acc2f3 100644 --- a/massif/tests/overloaded-new.vgtest +++ b/massif/tests/overloaded-new.vgtest @@ -2,5 +2,6 @@ prog: overloaded-new vgopts: --stacks=no --time-unit=B --massif-out-file=massif.out vgopts: --ignore-fn=__part_load_locale --ignore-fn=__time_load_locale --ignore-fn=dwarf2_unwind_dyld_add_image_hook vgopts: --ignore-fn=get_or_create_key_element --ignore-fn=_GLOBAL__sub_I_eh_alloc.cc --ignore-fn=call_init.part.0 +vgopts: --ignore-fn=call_init post: perl ../../massif/ms_print massif.out | ../../tests/filter_addresses cleanup: rm massif.out diff --git a/memcheck/tests/libstdc++.supp b/memcheck/tests/libstdc++.supp index 3cd2e628da..852d8ab0b6 100644 --- a/memcheck/tests/libstdc++.supp +++ b/memcheck/tests/libstdc++.supp @@ -52,26 +52,21 @@ # All the following suppressions are variants of # _dl_init -> call_init which calls the DT_INIT_ARRAY functions +# These suppressions are sensitive to changes to GCC and libstdc++ +# in order to generate a suppression stanza run +# +# /vg-in-place --gen-suppressions=all --show-reachable=yes --leak-check=full --run-cxx-freeres=no memcheck/tests/leak_cpp_interior +# +# since leaks are ordered by increasing size the stanza to look for is the last one + + { malloc-leaks-cxx-stl-string-classes Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:*lib*/libstdc++.so* - fun:call_init.part.0 - fun:call_init - fun:_dl_init - obj:*lib*/ld-2.*.so -} -{ - malloc-leaks-cxx-stl-string-classes-2 - Memcheck:Leak - match-leak-kinds: reachable - fun:malloc - obj:*lib*/libstdc++.so* - fun:call_init.part.0 - fun:_dl_init - obj:*lib*/ld-2.*.so + fun:call_init* } { malloc-leaks-cxx-stl-string-classes-debug |
|
From: Julian S. <se...@so...> - 2021-11-13 08:28:39
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=2be719921e700a9ac9b85f470ed87cb8adf8151b commit 2be719921e700a9ac9b85f470ed87cb8adf8151b Author: Julian Seward <js...@ac...> Date: Sat Nov 13 09:27:01 2021 +0100 Bug 445415 - arm64 front end: alignment checks missing for atomic instructions. For the arm64 front end, none of the atomic instructions have address alignment checks included in their IR. They all should. The effect of missing alignment checks in the IR is that, since this IR will in most cases be translated back to atomic instructions in the back end, we will get alignment traps (SIGBUS) on the host side and not on the guest side, which is (very) incorrect behaviour of the simulation. Diff: --- NEWS | 2 ++ VEX/priv/guest_arm64_toIR.c | 47 ++++++++++++++++++++++++++++++++++++++++----- VEX/priv/host_arm64_defs.c | 1 + VEX/priv/host_arm64_isel.c | 5 +++-- 4 files changed, 48 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index 1fafeeef9e..708c6e1df7 100644 --- a/NEWS +++ b/NEWS @@ -51,12 +51,14 @@ are not entered into bugzilla tend to get forgotten about or ignored. 445032 valgrind/memcheck crash with SIGSEGV when SIGVTALRM timer used and libthr.so associated 445354 arm64 backend: incorrect code emitted for doubleword CAS +445415 arm64 front end: alignment checks missing for atomic instructions To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX where XXXXXX is the bug number as listed below. + Release 3.18.0 (15 Oct 2021) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/VEX/priv/guest_arm64_toIR.c b/VEX/priv/guest_arm64_toIR.c index ee018c6a9f..16a7e075f0 100644 --- a/VEX/priv/guest_arm64_toIR.c +++ b/VEX/priv/guest_arm64_toIR.c @@ -4833,6 +4833,34 @@ static IRTemp gen_zwidening_load ( UInt szB, IRTemp addr ) } +/* Generate a SIGBUS followed by a restart of the current instruction if + `effective_addr` is `align`-aligned. This is required behaviour for atomic + instructions. This assumes that guest_RIP_curr_instr is set correctly! + + This is hardwired to generate SIGBUS because so far the only supported arm64 + (arm64-linux) does that. Should we need to later extend it to generate some + other signal, use the same scheme as with gen_SIGNAL_if_not_XX_aligned in + guest_amd64_toIR.c. */ +static +void gen_SIGBUS_if_not_XX_aligned ( IRTemp effective_addr, ULong align ) +{ + if (align == 1) { + return; + } + vassert(align == 16 || align == 8 || align == 4 || align == 2); + stmt( + IRStmt_Exit( + binop(Iop_CmpNE64, + binop(Iop_And64,mkexpr(effective_addr),mkU64(align-1)), + mkU64(0)), + Ijk_SigBUS, + IRConst_U64(guest_PC_curr_instr), + OFFB_PC + ) + ); +} + + /* Generate a "standard 7" name, from bitQ and size. But also allow ".1d" since that's occasionally useful. */ static @@ -6670,7 +6698,7 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, IRTemp ea = newTemp(Ity_I64); assign(ea, getIReg64orSP(nn)); - /* FIXME generate check that ea is szB-aligned */ + gen_SIGBUS_if_not_XX_aligned(ea, szB); if (isLD && ss == BITS5(1,1,1,1,1)) { IRTemp res = newTemp(ty); @@ -6803,7 +6831,7 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, IRTemp ea = newTemp(Ity_I64); assign(ea, getIReg64orSP(nn)); - /* FIXME generate check that ea is 2*elemSzB-aligned */ + gen_SIGBUS_if_not_XX_aligned(ea, fullSzB); if (isLD && ss == BITS5(1,1,1,1,1)) { if (abiinfo->guest__use_fallback_LLSC) { @@ -7044,7 +7072,7 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, IRTemp ea = newTemp(Ity_I64); assign(ea, getIReg64orSP(nn)); - /* FIXME generate check that ea is szB-aligned */ + gen_SIGBUS_if_not_XX_aligned(ea, szB); if (isLD) { IRTemp res = newTemp(ty); @@ -7159,6 +7187,7 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, IRTemp ea = newTemp(Ity_I64); assign(ea, getIReg64orSP(nn)); + gen_SIGBUS_if_not_XX_aligned(ea, szB); // Insert barrier before loading for acquire and acquire-release variants: // A and AL. @@ -7266,6 +7295,10 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, IRType ty = integerIRTypeOfSize(szB); Bool is64 = szB == 8; + IRTemp ea = newTemp(Ity_I64); + assign(ea, getIReg64orSP(nn)); + gen_SIGBUS_if_not_XX_aligned(ea, szB); + IRExpr *exp = narrowFrom64(ty, getIReg64orZR(ss)); IRExpr *new = narrowFrom64(ty, getIReg64orZR(tt)); @@ -7275,7 +7308,7 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, // Store the result back if LHS remains unchanged in memory. IRTemp old = newTemp(ty); stmt( IRStmt_CAS(mkIRCAS(/*oldHi*/IRTemp_INVALID, old, - Iend_LE, getIReg64orSP(nn), + Iend_LE, mkexpr(ea), /*expdHi*/NULL, exp, /*dataHi*/NULL, new)) ); @@ -7307,6 +7340,10 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, if ((ss & 0x1) || (tt & 0x1)) { /* undefined; fall through */ } else { + IRTemp ea = newTemp(Ity_I64); + assign(ea, getIReg64orSP(nn)); + gen_SIGBUS_if_not_XX_aligned(ea, is64 ? 16 : 8); + IRExpr *expLo = getIRegOrZR(is64, ss); IRExpr *expHi = getIRegOrZR(is64, ss + 1); IRExpr *newLo = getIRegOrZR(is64, tt); @@ -7318,7 +7355,7 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, stmt(IRStmt_MBE(Imbe_Fence)); stmt( IRStmt_CAS(mkIRCAS(oldHi, oldLo, - Iend_LE, getIReg64orSP(nn), + Iend_LE, mkexpr(ea), expHi, expLo, newHi, newLo)) ); diff --git a/VEX/priv/host_arm64_defs.c b/VEX/priv/host_arm64_defs.c index b65e27db4d..39c6aaa46b 100644 --- a/VEX/priv/host_arm64_defs.c +++ b/VEX/priv/host_arm64_defs.c @@ -4033,6 +4033,7 @@ Int emit_ARM64Instr ( /*MB_MOD*/Bool* is_profInc, case Ijk_FlushDCache: trcval = VEX_TRC_JMP_FLUSHDCACHE; break; case Ijk_NoRedir: trcval = VEX_TRC_JMP_NOREDIR; break; case Ijk_SigTRAP: trcval = VEX_TRC_JMP_SIGTRAP; break; + case Ijk_SigBUS: trcval = VEX_TRC_JMP_SIGBUS; break; //case Ijk_SigSEGV: trcval = VEX_TRC_JMP_SIGSEGV; break; case Ijk_Boring: trcval = VEX_TRC_JMP_BORING; break; /* We don't expect to see the following being assisted. */ diff --git a/VEX/priv/host_arm64_isel.c b/VEX/priv/host_arm64_isel.c index 094e7e74b4..82cb2d78c6 100644 --- a/VEX/priv/host_arm64_isel.c +++ b/VEX/priv/host_arm64_isel.c @@ -4483,6 +4483,7 @@ static void iselStmt ( ISelEnv* env, IRStmt* stmt ) case Ijk_InvalICache: case Ijk_FlushDCache: case Ijk_SigTRAP: + case Ijk_SigBUS: case Ijk_Yield: { HReg r = iselIntExpr_R(env, IRExpr_Const(stmt->Ist.Exit.dst)); addInstr(env, ARM64Instr_XAssisted(r, amPC, cc, @@ -4576,8 +4577,8 @@ static void iselNext ( ISelEnv* env, case Ijk_InvalICache: case Ijk_FlushDCache: case Ijk_SigTRAP: - case Ijk_Yield: - { + case Ijk_SigBUS: + case Ijk_Yield: { HReg r = iselIntExpr_R(env, next); ARM64AMode* amPC = mk_baseblock_64bit_access_amode(offsIP); addInstr(env, ARM64Instr_XAssisted(r, amPC, ARM64cc_AL, jk)); |
|
From: Julian S. <se...@so...> - 2021-11-13 08:08:59
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=92e56be59b3f32e7c749bfabcd6d775b779001ab commit 92e56be59b3f32e7c749bfabcd6d775b779001ab Author: Julian Seward <js...@ac...> Date: Sat Nov 13 09:08:27 2021 +0100 Add missing NEWS entry for bug 444399 (== 434283). Diff: --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 55ad93c4cb..1fafeeef9e 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,8 @@ than mailing the developers (or mailing lists) directly -- bugs that are not entered into bugzilla tend to get forgotten about or ignored. 444242 s390x: Valgrind crashes on EXRL with negative offset +444399 arm64: unhandled instruction 0xC87F2D89 (LD{,A}XP and ST{,L}XP). + == 434283 444495 dhat/tests/copy fails on s390x 444571 PPC, fix the lxsibzx and lxsihzx so they only load their respective sized data. |
|
From: Paul F. <pa...@so...> - 2021-11-12 23:26:29
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7d47865aa7d69c7f2dbaa38cd8930bfeaa7204ae commit 7d47865aa7d69c7f2dbaa38cd8930bfeaa7204ae Author: Paul Floyd <pj...@wa...> Date: Sat Nov 13 00:25:43 2021 +0100 No longer need FreeBSD expected for C++ demangle test Diff: --- memcheck/tests/Makefile.am | 1 - memcheck/tests/demangle.stderr.exp-freebsd | 0 2 files changed, 1 deletion(-) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 2b43ef7d75..7c270dd3de 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -140,7 +140,6 @@ EXTRA_DIST = \ cxx17_aligned_new.stdout.exp \ deep-backtrace.vgtest deep-backtrace.stderr.exp \ demangle.stderr.exp demangle.vgtest \ - demangle.stderr.exp-freebsd \ big_debuginfo_symbol.stderr.exp big_debuginfo_symbol.vgtest \ describe-block.stderr.exp describe-block.vgtest \ descr_belowsp.vgtest descr_belowsp.stderr.exp \ diff --git a/memcheck/tests/demangle.stderr.exp-freebsd b/memcheck/tests/demangle.stderr.exp-freebsd deleted file mode 100644 index e69de29bb2..0000000000 |
|
From: Paul F. <pa...@so...> - 2021-11-12 23:05:33
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=e24f3b6b214588676c24f66ca0d144ba2592447f commit e24f3b6b214588676c24f66ca0d144ba2592447f Author: Paul Floyd <pj...@wa...> Date: Sat Nov 13 00:00:38 2021 +0100 Bugs 435732 and 403802 The problem is that the testcase specific suppression has stacks that are too specific. This causes breakage with different versions of GCC and libstdc++. The suppression only needs to mask the memory pool used for standard io. There are several suppression stanzas so future tweaks may still be necessary. Diff: --- memcheck/tests/libstdc++.supp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/memcheck/tests/libstdc++.supp b/memcheck/tests/libstdc++.supp index 520e6613a8..3cd2e628da 100644 --- a/memcheck/tests/libstdc++.supp +++ b/memcheck/tests/libstdc++.supp @@ -81,10 +81,6 @@ fun:pool fun:__static_initialization_and_destruction_0 fun:_GLOBAL__sub_I_eh_alloc.cc - fun:call_init.part.0 - fun:call_init - fun:_dl_init - obj:*lib*/ld-2.*.so } { malloc-leaks-cxx-stl-string-classes-debug2 |
|
From: Paul F. <pa...@so...> - 2021-11-12 22:47:51
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=c09706352adcfc66e9c7c598e45830a609223346 commit c09706352adcfc66e9c7c598e45830a609223346 Author: Paul Floyd <pj...@wa...> Date: Fri Nov 12 23:44:54 2021 +0100 Make memcheck tests demangle and demangle-rust clang-friendly. Clang uses CMOV for ternary operators which does not immediately trigger an error. Using double free and new/free mismatch still poses no problem with clang but still uses the demangling. Also update .gitignore Diff: --- .gitignore | 1 + memcheck/tests/demangle-rust.c | 4 +++- memcheck/tests/demangle-rust.stderr.exp | 20 +++++++++++++++----- memcheck/tests/demangle.cpp | 4 +++- memcheck/tests/demangle.stderr.exp | 12 ++++++++---- 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 6a94e6c82d..770d08c278 100644 --- a/.gitignore +++ b/.gitignore @@ -843,6 +843,7 @@ /memcheck/tests/deep-backtrace /memcheck/tests/deep_templates /memcheck/tests/demangle +/memcheck/tests/demangle-rust /memcheck/tests/describe-block /memcheck/tests/descr_belowsp /memcheck/tests/dir diff --git a/memcheck/tests/demangle-rust.c b/memcheck/tests/demangle-rust.c index f2a458b2ac..f5805ff42b 100644 --- a/memcheck/tests/demangle-rust.c +++ b/memcheck/tests/demangle-rust.c @@ -9,7 +9,9 @@ // A v0 symbol that demangles to: <rustc_middle::ty::PredicateKind as rustc_middle::ty::fold::TypeFoldable>::fold_with::<rustc_infer::infer::resolve::OpportunisticVarResolver> int _RINvYNtNtCs4uGc65yWeeX_12rustc_middle2ty13PredicateKindNtNtB5_4fold12TypeFoldable9fold_withNtNtNtCsgI90OQiJWEs_11rustc_infer5infer7resolve24OpportunisticVarResolverECsdozMG8X9FIu_21rustc_trait_selection(int *p) { - return *p ? 1 : 2; + free(p); + free(p); + return 1; } // A v0 symbol that demangles to: rustc_expand::mbe::macro_parser::parse_tt diff --git a/memcheck/tests/demangle-rust.stderr.exp b/memcheck/tests/demangle-rust.stderr.exp index f04bb625b1..6579f08426 100644 --- a/memcheck/tests/demangle-rust.stderr.exp +++ b/memcheck/tests/demangle-rust.stderr.exp @@ -1,6 +1,16 @@ -Conditional jump or move depends on uninitialised value(s) - at 0x........: <rustc_middle::ty::PredicateKind as rustc_middle::ty::fold::TypeFoldable>::fold_with::<rustc_infer::infer::resolve::OpportunisticVarResolver> (demangle-rust.c:12) - by 0x........: rustc_expand::mbe::macro_parser::parse_tt (demangle-rust.c:18) - by 0x........: core::str::lossy::Utf8Lossy::from_bytes (demangle-rust.c:24) - by 0x........: main (demangle-rust.c:29) +Invalid free() / delete / delete[] / realloc() + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: <rustc_middle::ty::PredicateKind as rustc_middle::ty::fold::TypeFoldable>::fold_with::<rustc_infer::infer::resolve::OpportunisticVarResolver> (demangle-rust.c:13) + by 0x........: rustc_expand::mbe::macro_parser::parse_tt (demangle-rust.c:20) + by 0x........: core::str::lossy::Utf8Lossy::from_bytes (demangle-rust.c:26) + by 0x........: main (demangle-rust.c:31) + Address 0x........ is 0 bytes inside a block of size 4 free'd + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: <rustc_middle::ty::PredicateKind as rustc_middle::ty::fold::TypeFoldable>::fold_with::<rustc_infer::infer::resolve::OpportunisticVarResolver> (demangle-rust.c:12) + by 0x........: rustc_expand::mbe::macro_parser::parse_tt (demangle-rust.c:20) + by 0x........: core::str::lossy::Utf8Lossy::from_bytes (demangle-rust.c:26) + by 0x........: main (demangle-rust.c:31) + Block was alloc'd at + at 0x........: malloc (vg_replace_malloc.c:...) + by 0x........: main (demangle-rust.c:31) diff --git a/memcheck/tests/demangle.cpp b/memcheck/tests/demangle.cpp index ff15fe12c3..9922bf405f 100644 --- a/memcheck/tests/demangle.cpp +++ b/memcheck/tests/demangle.cpp @@ -1,4 +1,5 @@ // Simple smoke test to see that the demangler is actually working +#include <cstdlib> namespace abc { template <typename T1, typename T2> @@ -6,7 +7,8 @@ class def { public: T1 xyzzy(T1 *p, T2 *) { - return *p ? 10 : 20; + free(p); + return 10; } }; }; diff --git a/memcheck/tests/demangle.stderr.exp b/memcheck/tests/demangle.stderr.exp index 6e7467d7cf..4a4dc87d7f 100644 --- a/memcheck/tests/demangle.stderr.exp +++ b/memcheck/tests/demangle.stderr.exp @@ -1,5 +1,9 @@ -Conditional jump or move depends on uninitialised value(s) - at 0x........: abc::def<int, magic<int> >::xyzzy(int*, magic<int>*) (demangle.cpp:9) - by 0x........: magic<int>::xyzzy(int*) (demangle.cpp:19) - by 0x........: main (demangle.cpp:27) +Mismatched free() / delete / delete [] + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: abc::def<int, magic<int> >::xyzzy(int*, magic<int>*) (demangle.cpp:10) + by 0x........: magic<int>::xyzzy(int*) (demangle.cpp:21) + by 0x........: main (demangle.cpp:29) + Address 0x........ is 0 bytes inside a block of size 4 alloc'd + at 0x........: ...operator new... (vg_replace_malloc.c:...) + by 0x........: main (demangle.cpp:29) |
|
From: Julian S. <se...@so...> - 2021-11-12 12:10:44
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=0d38ca5dd6b446c70738031132d41f09de0f7a8a commit 0d38ca5dd6b446c70738031132d41f09de0f7a8a Author: Julian Seward <js...@ac...> Date: Fri Nov 12 13:08:45 2021 +0100 Bug 444399 - disInstr(arm64): unhandled instruction 0xC87F2D89 (LD{,A}XP and ST{,L}XP). FOLLOWUP FIX. This is an attempt to un-break 'make dist', as broken by the main commit for this bug, which was 530df882b8f60ecacaf2b9b8a719f7ea1c1d1650. Diff: --- none/tests/arm64/Makefile.am | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/none/tests/arm64/Makefile.am b/none/tests/arm64/Makefile.am index 9efb49b276..4a06f09961 100644 --- a/none/tests/arm64/Makefile.am +++ b/none/tests/arm64/Makefile.am @@ -14,8 +14,10 @@ EXTRA_DIST = \ fmadd_sub.stdout.exp fmadd_sub.stderr.exp fmadd_sub.vgtest \ fp_and_simd_v82.stdout.exp fp_and_simd_v82.stderr.exp \ fp_and_simd_v82.vgtest \ - ldxp_stxp.stdout.exp ldxp_stxp.stderr.exp \ - ldxp_stxp_basisimpl.vgtest ldxp_stxp_fallbackimpl.vgtest + ldxp_stxp_basisimpl.stdout.exp ldxp_stxp_basisimpl.stderr.exp \ + ldxp_stxp_basisimpl.vgtest \ + ldxp_stxp_fallbackimpl.stdout.exp ldxp_stxp_fallbackimpl.stderr.exp \ + ldxp_stxp_fallbackimpl.vgtest check_PROGRAMS = \ allexec \ |
|
From: Julian S. <se...@so...> - 2021-11-12 11:16:24
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=530df882b8f60ecacaf2b9b8a719f7ea1c1d1650 commit 530df882b8f60ecacaf2b9b8a719f7ea1c1d1650 Author: Julian Seward <js...@ac...> Date: Fri Nov 12 12:13:45 2021 +0100 Bug 444399 - disInstr(arm64): unhandled instruction 0xC87F2D89 (LD{,A}XP and ST{,L}XP). This is unfortunately a big and complex patch, to implement LD{,A}XP and ST{,L}XP. These were omitted from the original AArch64 v8.0 implementation for unknown reasons. (Background) the patch is made significantly more complex because for AArch64 we actually have two implementations of the underlying Load-Linked/Store-Conditional (LL/SC) machinery: a "primary" implementation, which translates LL/SC more or less directly into IR and re-emits them at the back end, and a "fallback" implementation that implements LL/SC "manually", by taking advantage of the fact that V serialises thread execution, so we can "implement" LL/SC by simulating a reservation using fields LLSC_* in the guest state, and invalidating the reservation at every thread switch. (Background) the fallback scheme is needed because the primary scheme is in violation of the ARMv8 semantics in that it can (easily) introduce extra memory references between the LL and SC, hence on some hardware causing the reservation to always fail and so the simulated program to wind up looping forever. For these instructions, big picture: * for the primary implementation, we take advantage of the fact that IRStmt_LLSC allows I128 bit transactions to be represented. Hence we bundle up the two 64-bit data elements into an I128 (or vice versa) and present a single I128-typed IRStmt_LLSC in the IR. In the backend, those are re-emitted as LDXP/STXP respectively. For LL/SC on 32-bit register pairs, that bundling produces a single 64-bit item, and so the existing LL/SC backend machinery handles it. The effect is that a doubleword 32-bit LL/SC in the front end translates into a single 64-bit LL/SC in the back end. Overall, though, the implementation is straightforward. * for the fallback implementation, it is necessary to extend the guest state field `guest_LLSC_DATA` to represent a 128-bit transaction, by splitting it into _DATA_LO64 and DATA_HI64. Then, the implementation is an exact analogue of the fallback implementation for single-word LL/SC. It takes advantage of the fact that the backend already supports 128-bit CAS, as fixed in bug 445354. As with the primary implementation, doubleword 32-bit LL/SC is bundled into a single 64-bit transaction. Detailed changes: * new arm64 guest state fields LLSC_DATA_LO64/LLSC_DATA_LO64 to replace guest_LLSC_DATA * (ridealong fix) arm64 front end: a fix to a minor and harmless decoding bug for the single-word LDX/STX case. * arm64 front end: IR generation for LD{,A}XP/ST{,L}XP: tedious and longwinded, but per comments above, an exact(ish) analogue of the singleword case * arm64 backend: new insns ARM64Instr_LdrEXP / ARM64Instr_StrEXP to wrap up 2 x 64 exclusive loads/stores. Per comments above, there's no need to handle the 2 x 32 case. * arm64 isel: translate I128-typed IRStmt_LLSC into the above two insns * arm64 isel: some auxiliary bits and pieces needed to handle I128 values; this is standard doubleword isel stuff * arm64 isel: (ridealong fix): Ist_CAS: check for endianness of the CAS! * arm64 isel: (ridealong) a couple of formatting fixes * IR infrastructure: add support for I128 constants, done the same as V128 constants * memcheck: handle shadow loads and stores for I128 values * testcase: memcheck/tests/atomic_incs.c: on arm64, also test 128-bit atomic addition, to check we really have atomicity right * testcase: new test none/tests/arm64/ldxp_stxp.c, tests operation but not atomicity. (Smoke test). Diff: --- VEX/priv/guest_arm64_toIR.c | 265 ++++++++++++++++++++- VEX/priv/host_arm64_defs.c | 44 +++- VEX/priv/host_arm64_defs.h | 14 +- VEX/priv/host_arm64_isel.c | 143 ++++++++--- VEX/priv/ir_defs.c | 14 +- VEX/pub/libvex_guest_arm64.h | 12 +- VEX/pub/libvex_ir.h | 4 + memcheck/mc_machine.c | 7 +- memcheck/mc_translate.c | 45 +++- memcheck/tests/Makefile.am | 1 + memcheck/tests/atomic_incs.c | 62 ++++- memcheck/tests/atomic_incs.stdout.exp-32bit | 1 + memcheck/tests/atomic_incs.stdout.exp-64bit | 1 + .../tests/atomic_incs.stdout.exp-64bit-and-128bit | 8 + none/tests/arm64/Makefile.am | 8 +- none/tests/arm64/ldxp_stxp.c | 93 ++++++++ none/tests/arm64/ldxp_stxp_basisimpl.stderr.exp | 0 none/tests/arm64/ldxp_stxp_basisimpl.stdout.exp | 20 ++ none/tests/arm64/ldxp_stxp_basisimpl.vgtest | 2 + none/tests/arm64/ldxp_stxp_fallbackimpl.stderr.exp | 0 none/tests/arm64/ldxp_stxp_fallbackimpl.stdout.exp | 20 ++ none/tests/arm64/ldxp_stxp_fallbackimpl.vgtest | 2 + 22 files changed, 704 insertions(+), 62 deletions(-) diff --git a/VEX/priv/guest_arm64_toIR.c b/VEX/priv/guest_arm64_toIR.c index 12a1c5978a..ee018c6a9f 100644 --- a/VEX/priv/guest_arm64_toIR.c +++ b/VEX/priv/guest_arm64_toIR.c @@ -1184,9 +1184,10 @@ static IRExpr* narrowFrom64 ( IRType dstTy, IRExpr* e ) #define OFFB_CMSTART offsetof(VexGuestARM64State,guest_CMSTART) #define OFFB_CMLEN offsetof(VexGuestARM64State,guest_CMLEN) -#define OFFB_LLSC_SIZE offsetof(VexGuestARM64State,guest_LLSC_SIZE) -#define OFFB_LLSC_ADDR offsetof(VexGuestARM64State,guest_LLSC_ADDR) -#define OFFB_LLSC_DATA offsetof(VexGuestARM64State,guest_LLSC_DATA) +#define OFFB_LLSC_SIZE offsetof(VexGuestARM64State,guest_LLSC_SIZE) +#define OFFB_LLSC_ADDR offsetof(VexGuestARM64State,guest_LLSC_ADDR) +#define OFFB_LLSC_DATA_LO64 offsetof(VexGuestARM64State,guest_LLSC_DATA_LO64) +#define OFFB_LLSC_DATA_HI64 offsetof(VexGuestARM64State,guest_LLSC_DATA_HI64) /* ---------------- Integer registers ---------------- */ @@ -6652,7 +6653,7 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, (coregrind/m_scheduler/scheduler.c, run_thread_for_a_while() has to do this bit) */ - if (INSN(29,23) == BITS7(0,0,1,0,0,0,0) + if (INSN(29,24) == BITS6(0,0,1,0,0,0) && (INSN(23,21) & BITS3(1,0,1)) == BITS3(0,0,0) && INSN(14,10) == BITS5(1,1,1,1,1)) { UInt szBlg2 = INSN(31,30); @@ -6678,7 +6679,8 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, // if it faults. IRTemp loaded_data64 = newTemp(Ity_I64); assign(loaded_data64, widenUto64(ty, loadLE(ty, mkexpr(ea)))); - stmt( IRStmt_Put( OFFB_LLSC_DATA, mkexpr(loaded_data64) )); + stmt( IRStmt_Put( OFFB_LLSC_DATA_LO64, mkexpr(loaded_data64) )); + stmt( IRStmt_Put( OFFB_LLSC_DATA_HI64, mkU64(0) )); stmt( IRStmt_Put( OFFB_LLSC_ADDR, mkexpr(ea) )); stmt( IRStmt_Put( OFFB_LLSC_SIZE, mkU64(szB) )); putIReg64orZR(tt, mkexpr(loaded_data64)); @@ -6729,7 +6731,7 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, )); // Fail if the data doesn't match the LL data IRTemp llsc_data64 = newTemp(Ity_I64); - assign(llsc_data64, IRExpr_Get(OFFB_LLSC_DATA, Ity_I64)); + assign(llsc_data64, IRExpr_Get(OFFB_LLSC_DATA_LO64, Ity_I64)); stmt( IRStmt_Exit( binop(Iop_CmpNE64, widenUto64(ty, loadLE(ty, mkexpr(ea))), mkexpr(llsc_data64)), @@ -6771,6 +6773,257 @@ Bool dis_ARM64_load_store(/*MB_OUT*/DisResult* dres, UInt insn, /* else fall through */ } + /* -------------------- LD{,A}XP -------------------- */ + /* -------------------- ST{,L}XP -------------------- */ + /* 31 30 29 23 20 15 14 9 4 + 1 sz 001000 011 11111 0 t2 n t1 LDXP Rt1, Rt2, [Xn|SP] + 1 sz 001000 011 11111 1 t2 n t1 LDAXP Rt1, Rt2, [Xn|SP] + 1 sz 001000 001 s 0 t2 n t1 STXP Ws, Rt1, Rt2, [Xn|SP] + 1 sz 001000 001 s 1 t2 n t1 STLXP Ws, Rt1, Rt2, [Xn|SP] + */ + /* See just above, "LD{,A}X{R,RH,RB} / ST{,L}X{R,RH,RB}", for detailed + comments about this implementation. Note the 'sz' field here is only 1 + bit; above, it is 2 bits, and has a different encoding. + */ + if (INSN(31,31) == 1 + && INSN(29,24) == BITS6(0,0,1,0,0,0) + && (INSN(23,21) & BITS3(1,0,1)) == BITS3(0,0,1)) { + Bool elemIs64 = INSN(30,30) == 1; + Bool isLD = INSN(22,22) == 1; + Bool isAcqOrRel = INSN(15,15) == 1; + UInt ss = INSN(20,16); + UInt tt2 = INSN(14,10); + UInt nn = INSN(9,5); + UInt tt1 = INSN(4,0); + + UInt elemSzB = elemIs64 ? 8 : 4; + UInt fullSzB = 2 * elemSzB; + IRType elemTy = integerIRTypeOfSize(elemSzB); + IRType fullTy = integerIRTypeOfSize(fullSzB); + + IRTemp ea = newTemp(Ity_I64); + assign(ea, getIReg64orSP(nn)); + /* FIXME generate check that ea is 2*elemSzB-aligned */ + + if (isLD && ss == BITS5(1,1,1,1,1)) { + if (abiinfo->guest__use_fallback_LLSC) { + // Fallback implementation of LL. + // Do the load first so we don't update any guest state if it + // faults. Assumes little-endian guest. + if (fullTy == Ity_I64) { + vassert(elemSzB == 4); + IRTemp loaded_data64 = newTemp(Ity_I64); + assign(loaded_data64, loadLE(fullTy, mkexpr(ea))); + stmt( IRStmt_Put( OFFB_LLSC_DATA_LO64, mkexpr(loaded_data64) )); + stmt( IRStmt_Put( OFFB_LLSC_DATA_HI64, mkU64(0) )); + stmt( IRStmt_Put( OFFB_LLSC_ADDR, mkexpr(ea) )); + stmt( IRStmt_Put( OFFB_LLSC_SIZE, mkU64(8) )); + putIReg64orZR(tt1, unop(Iop_32Uto64, + unop(Iop_64to32, + mkexpr(loaded_data64)))); + putIReg64orZR(tt2, unop(Iop_32Uto64, + unop(Iop_64HIto32, + mkexpr(loaded_data64)))); + } else { + vassert(elemSzB == 8 && fullTy == Ity_I128); + IRTemp loaded_data128 = newTemp(Ity_I128); + // Hack: do the load as V128 rather than I128 so as to avoid + // having to implement I128 loads in the arm64 back end. + assign(loaded_data128, unop(Iop_ReinterpV128asI128, + loadLE(Ity_V128, mkexpr(ea)))); + IRTemp loaded_data_lo64 = newTemp(Ity_I64); + IRTemp loaded_data_hi64 = newTemp(Ity_I64); + assign(loaded_data_lo64, unop(Iop_128to64, + mkexpr(loaded_data128))); + assign(loaded_data_hi64, unop(Iop_128HIto64, + mkexpr(loaded_data128))); + stmt( IRStmt_Put( OFFB_LLSC_DATA_LO64, + mkexpr(loaded_data_lo64) )); + stmt( IRStmt_Put( OFFB_LLSC_DATA_HI64, + mkexpr(loaded_data_hi64) )); + stmt( IRStmt_Put( OFFB_LLSC_ADDR, mkexpr(ea) )); + stmt( IRStmt_Put( OFFB_LLSC_SIZE, mkU64(16) )); + putIReg64orZR(tt1, mkexpr(loaded_data_lo64)); + putIReg64orZR(tt2, mkexpr(loaded_data_hi64)); + } + } else { + // Non-fallback implementation of LL. + IRTemp res = newTemp(fullTy); // I64 or I128 + stmt(IRStmt_LLSC(Iend_LE, res, mkexpr(ea), NULL/*LL*/)); + // Assuming a little-endian guest here. Rt1 goes at the lower + // address, so it must live in the least significant half of `res`. + IROp opGetLO = fullTy == Ity_I128 ? Iop_128to64 : Iop_64to32; + IROp opGetHI = fullTy == Ity_I128 ? Iop_128HIto64 : Iop_64HIto32; + putIReg64orZR(tt1, widenUto64(elemTy, unop(opGetLO, mkexpr(res)))); + putIReg64orZR(tt2, widenUto64(elemTy, unop(opGetHI, mkexpr(res)))); + } + if (isAcqOrRel) { + stmt(IRStmt_MBE(Imbe_Fence)); + } + DIP("ld%sxp %s, %s, [%s] %s\n", + isAcqOrRel ? (isLD ? "a" : "l") : "", + nameIRegOrZR(elemSzB == 8, tt1), + nameIRegOrZR(elemSzB == 8, tt2), + nameIReg64orSP(nn), + abiinfo->guest__use_fallback_LLSC + ? "(fallback implementation)" : ""); + return True; + } + if (!isLD) { + if (isAcqOrRel) { + stmt(IRStmt_MBE(Imbe_Fence)); + } + if (abiinfo->guest__use_fallback_LLSC) { + // Fallback implementation of SC. + // This is really ugly, since we don't have any way to do + // proper if-then-else. First, set up as if the SC failed, + // and jump forwards if it really has failed. + + // Continuation address + IRConst* nia = IRConst_U64(guest_PC_curr_instr + 4); + + // "the SC failed". Any non-zero value means failure. + putIReg64orZR(ss, mkU64(1)); + + IRTemp tmp_LLsize = newTemp(Ity_I64); + assign(tmp_LLsize, IRExpr_Get(OFFB_LLSC_SIZE, Ity_I64)); + stmt( IRStmt_Put( OFFB_LLSC_SIZE, mkU64(0) // "no transaction" + )); + // Fail if no or wrong-size transaction + vassert((fullSzB == 8 && fullTy == Ity_I64) + || (fullSzB == 16 && fullTy == Ity_I128)); + stmt( IRStmt_Exit( + binop(Iop_CmpNE64, mkexpr(tmp_LLsize), mkU64(fullSzB)), + Ijk_Boring, nia, OFFB_PC + )); + // Fail if the address doesn't match the LL address + stmt( IRStmt_Exit( + binop(Iop_CmpNE64, mkexpr(ea), + IRExpr_Get(OFFB_LLSC_ADDR, Ity_I64)), + Ijk_Boring, nia, OFFB_PC + )); + // The data to be stored. + IRTemp store_data = newTemp(fullTy); + if (fullTy == Ity_I64) { + assign(store_data, + binop(Iop_32HLto64, + narrowFrom64(Ity_I32, getIReg64orZR(tt2)), + narrowFrom64(Ity_I32, getIReg64orZR(tt1)))); + } else { + assign(store_data, + binop(Iop_64HLto128, + getIReg64orZR(tt2), getIReg64orZR(tt1))); + } + + if (fullTy == Ity_I64) { + // 64 bit (2x32 bit) path + // Fail if the data in memory doesn't match the data stashed by + // the LL. + IRTemp llsc_data_lo64 = newTemp(Ity_I64); + assign(llsc_data_lo64, + IRExpr_Get(OFFB_LLSC_DATA_LO64, Ity_I64)); + stmt( IRStmt_Exit( + binop(Iop_CmpNE64, loadLE(Ity_I64, mkexpr(ea)), + mkexpr(llsc_data_lo64)), + Ijk_Boring, nia, OFFB_PC + )); + // Try to CAS the new value in. + IRTemp old = newTemp(Ity_I64); + IRTemp expd = newTemp(Ity_I64); + assign(expd, mkexpr(llsc_data_lo64)); + stmt( IRStmt_CAS(mkIRCAS(/*oldHi*/IRTemp_INVALID, old, + Iend_LE, mkexpr(ea), + /*expdHi*/NULL, mkexpr(expd), + /*dataHi*/NULL, mkexpr(store_data) + ))); + // Fail if the CAS failed (viz, old != expd) + stmt( IRStmt_Exit( + binop(Iop_CmpNE64, mkexpr(old), mkexpr(expd)), + Ijk_Boring, nia, OFFB_PC + )); + } else { + // 128 bit (2x64 bit) path + // Fail if the data in memory doesn't match the data stashed by + // the LL. + IRTemp llsc_data_lo64 = newTemp(Ity_I64); + assign(llsc_data_lo64, + IRExpr_Get(OFFB_LLSC_DATA_LO64, Ity_I64)); + IRTemp llsc_data_hi64 = newTemp(Ity_I64); + assign(llsc_data_hi64, + IRExpr_Get(OFFB_LLSC_DATA_HI64, Ity_I64)); + IRTemp data_at_ea = newTemp(Ity_I128); + assign(data_at_ea, + unop(Iop_ReinterpV128asI128, + loadLE(Ity_V128, mkexpr(ea)))); + stmt( IRStmt_Exit( + binop(Iop_CmpNE64, + unop(Iop_128to64, mkexpr(data_at_ea)), + mkexpr(llsc_data_lo64)), + Ijk_Boring, nia, OFFB_PC + )); + stmt( IRStmt_Exit( + binop(Iop_CmpNE64, + unop(Iop_128HIto64, mkexpr(data_at_ea)), + mkexpr(llsc_data_hi64)), + Ijk_Boring, nia, OFFB_PC + )); + // Try to CAS the new value in. + IRTemp old_lo64 = newTemp(Ity_I64); + IRTemp old_hi64 = newTemp(Ity_I64); + IRTemp expd_lo64 = newTemp(Ity_I64); + IRTemp expd_hi64 = newTemp(Ity_I64); + IRTemp store_data_lo64 = newTemp(Ity_I64); + IRTemp store_data_hi64 = newTemp(Ity_I64); + assign(expd_lo64, mkexpr(llsc_data_lo64)); + assign(expd_hi64, mkexpr(llsc_data_hi64)); + assign(store_data_lo64, unop(Iop_128to64, mkexpr(store_data))); + assign(store_data_hi64, unop(Iop_128HIto64, mkexpr(store_data))); + stmt( IRStmt_CAS(mkIRCAS(old_hi64, old_lo64, + Iend_LE, mkexpr(ea), + mkexpr(expd_hi64), mkexpr(expd_lo64), + mkexpr(store_data_hi64), + mkexpr(store_data_lo64) + ))); + // Fail if the CAS failed (viz, old != expd) + stmt( IRStmt_Exit( + binop(Iop_CmpNE64, mkexpr(old_lo64), mkexpr(expd_lo64)), + Ijk_Boring, nia, OFFB_PC + )); + stmt( IRStmt_Exit( + binop(Iop_CmpNE64, mkexpr(old_hi64), mkexpr(expd_hi64)), + Ijk_Boring, nia, OFFB_PC + )); + } + // Otherwise we succeeded (!) + putIReg64orZR(ss, mkU64(0)); + } else { + // Non-fallback implementation of SC. + IRTemp res = newTemp(Ity_I1); + IRExpr* dataLO = narrowFrom64(elemTy, getIReg64orZR(tt1)); + IRExpr* dataHI = narrowFrom64(elemTy, getIReg64orZR(tt2)); + IROp opMerge = fullTy == Ity_I128 ? Iop_64HLto128 : Iop_32HLto64; + IRExpr* data = binop(opMerge, dataHI, dataLO); + // Assuming a little-endian guest here. Rt1 goes at the lower + // address, so it must live in the least significant half of `data`. + stmt(IRStmt_LLSC(Iend_LE, res, mkexpr(ea), data)); + /* IR semantics: res is 1 if store succeeds, 0 if it fails. + Need to set rS to 1 on failure, 0 on success. */ + putIReg64orZR(ss, binop(Iop_Xor64, unop(Iop_1Uto64, mkexpr(res)), + mkU64(1))); + } + DIP("st%sxp %s, %s, %s, [%s] %s\n", + isAcqOrRel ? (isLD ? "a" : "l") : "", + nameIRegOrZR(False, ss), + nameIRegOrZR(elemSzB == 8, tt1), + nameIRegOrZR(elemSzB == 8, tt2), + nameIReg64orSP(nn), + abiinfo->guest__use_fallback_LLSC + ? "(fallback implementation)" : ""); + return True; + } + /* else fall through */ + } + /* ------------------ LDA{R,RH,RB} ------------------ */ /* ------------------ STL{R,RH,RB} ------------------ */ /* 31 29 23 20 14 9 4 diff --git a/VEX/priv/host_arm64_defs.c b/VEX/priv/host_arm64_defs.c index 5657bcab96..b65e27db4d 100644 --- a/VEX/priv/host_arm64_defs.c +++ b/VEX/priv/host_arm64_defs.c @@ -1059,6 +1059,16 @@ ARM64Instr* ARM64Instr_StrEX ( Int szB ) { vassert(szB == 8 || szB == 4 || szB == 2 || szB == 1); return i; } +ARM64Instr* ARM64Instr_LdrEXP ( void ) { + ARM64Instr* i = LibVEX_Alloc_inline(sizeof(ARM64Instr)); + i->tag = ARM64in_LdrEXP; + return i; +} +ARM64Instr* ARM64Instr_StrEXP ( void ) { + ARM64Instr* i = LibVEX_Alloc_inline(sizeof(ARM64Instr)); + i->tag = ARM64in_StrEXP; + return i; +} ARM64Instr* ARM64Instr_CAS ( Int szB ) { ARM64Instr* i = LibVEX_Alloc_inline(sizeof(ARM64Instr)); i->tag = ARM64in_CAS; @@ -1699,12 +1709,19 @@ void ppARM64Instr ( const ARM64Instr* i ) { sz, i->ARM64in.StrEX.szB == 8 ? 'x' : 'w'); return; } + case ARM64in_LdrEXP: + vex_printf("ldxp x2, x3, [x4]"); + return; + case ARM64in_StrEXP: + vex_printf("stxp w0, x2, x3, [x4]"); + return; case ARM64in_CAS: { vex_printf("x1 = cas(%dbit)(x3, x5 -> x7)", 8 * i->ARM64in.CAS.szB); return; } case ARM64in_CASP: { - vex_printf("x0,x1 = casp(%dbit)(x2, x4,x5 -> x6,x7)", 8 * i->ARM64in.CASP.szB); + vex_printf("x0,x1 = casp(2x%dbit)(x2, x4,x5 -> x6,x7)", + 8 * i->ARM64in.CASP.szB); return; } case ARM64in_MFence: @@ -2253,6 +2270,17 @@ void getRegUsage_ARM64Instr ( HRegUsage* u, const ARM64Instr* i, Bool mode64 ) addHRegUse(u, HRmWrite, hregARM64_X0()); addHRegUse(u, HRmRead, hregARM64_X2()); return; + case ARM64in_LdrEXP: + addHRegUse(u, HRmRead, hregARM64_X4()); + addHRegUse(u, HRmWrite, hregARM64_X2()); + addHRegUse(u, HRmWrite, hregARM64_X3()); + return; + case ARM64in_StrEXP: + addHRegUse(u, HRmRead, hregARM64_X4()); + addHRegUse(u, HRmWrite, hregARM64_X0()); + addHRegUse(u, HRmRead, hregARM64_X2()); + addHRegUse(u, HRmRead, hregARM64_X3()); + return; case ARM64in_CAS: addHRegUse(u, HRmRead, hregARM64_X3()); addHRegUse(u, HRmRead, hregARM64_X5()); @@ -2571,6 +2599,10 @@ void mapRegs_ARM64Instr ( HRegRemap* m, ARM64Instr* i, Bool mode64 ) return; case ARM64in_StrEX: return; + case ARM64in_LdrEXP: + return; + case ARM64in_StrEXP: + return; case ARM64in_CAS: return; case ARM64in_CASP: @@ -4167,6 +4199,16 @@ Int emit_ARM64Instr ( /*MB_MOD*/Bool* is_profInc, } goto bad; } + case ARM64in_LdrEXP: { + // 820C7FC8 ldxp x2, x3, [x4] + *p++ = 0xC87F0C82; + goto done; + } + case ARM64in_StrEXP: { + // 820C20C8 stxp w0, x2, x3, [x4] + *p++ = 0xC8200C82; + goto done; + } case ARM64in_CAS: { /* This isn't simple. For an explanation see the comment in host_arm64_defs.h on the definition of ARM64Instr case CAS. diff --git a/VEX/priv/host_arm64_defs.h b/VEX/priv/host_arm64_defs.h index 01fb5708e0..dc686dff7f 100644 --- a/VEX/priv/host_arm64_defs.h +++ b/VEX/priv/host_arm64_defs.h @@ -509,8 +509,10 @@ typedef ARM64in_AddToSP, /* move SP by small, signed constant */ ARM64in_FromSP, /* move SP to integer register */ ARM64in_Mul, - ARM64in_LdrEX, - ARM64in_StrEX, + ARM64in_LdrEX, /* load exclusive, single register */ + ARM64in_StrEX, /* store exclusive, single register */ + ARM64in_LdrEXP, /* load exclusive, register pair, 2x64-bit only */ + ARM64in_StrEXP, /* store exclusive, register pair, 2x64-bit only */ ARM64in_CAS, ARM64in_CASP, ARM64in_MFence, @@ -719,6 +721,12 @@ typedef struct { Int szB; /* 1, 2, 4 or 8 */ } StrEX; + /* LDXP x2, x3, [x4]. This is 2x64-bit only. */ + struct { + } LdrEXP; + /* STXP w0, x2, x3, [x4]. This is 2x64-bit only. */ + struct { + } StrEXP; /* x1 = CAS(x3(addr), x5(expected) -> x7(new)), and trashes x8 where x1[8*szB-1 : 0] == x5[8*szB-1 : 0] indicates success, @@ -1037,6 +1045,8 @@ extern ARM64Instr* ARM64Instr_Mul ( HReg dst, HReg argL, HReg argR, ARM64MulOp op ); extern ARM64Instr* ARM64Instr_LdrEX ( Int szB ); extern ARM64Instr* ARM64Instr_StrEX ( Int szB ); +extern ARM64Instr* ARM64Instr_LdrEXP ( void ); +extern ARM64Instr* ARM64Instr_StrEXP ( void ); extern ARM64Instr* ARM64Instr_CAS ( Int szB ); extern ARM64Instr* ARM64Instr_CASP ( Int szB ); extern ARM64Instr* ARM64Instr_MFence ( void ); diff --git a/VEX/priv/host_arm64_isel.c b/VEX/priv/host_arm64_isel.c index 4b1d8c8469..094e7e74b4 100644 --- a/VEX/priv/host_arm64_isel.c +++ b/VEX/priv/host_arm64_isel.c @@ -196,9 +196,9 @@ static HReg iselCondCode_R ( ISelEnv* env, IRExpr* e ); static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e ); static HReg iselIntExpr_R ( ISelEnv* env, IRExpr* e ); -static void iselInt128Expr_wrk ( /*OUT*/HReg* rHi, HReg* rLo, +static void iselInt128Expr_wrk ( /*OUT*/HReg* rHi, /*OUT*/HReg* rLo, ISelEnv* env, IRExpr* e ); -static void iselInt128Expr ( /*OUT*/HReg* rHi, HReg* rLo, +static void iselInt128Expr ( /*OUT*/HReg* rHi, /*OUT*/HReg* rLo, ISelEnv* env, IRExpr* e ); static HReg iselDblExpr_wrk ( ISelEnv* env, IRExpr* e ); @@ -1759,9 +1759,12 @@ static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e ) /* AND/OR/XOR(e1, e2) (for any e1, e2) */ switch (e->Iex.Binop.op) { - case Iop_And64: case Iop_And32: lop = ARM64lo_AND; goto log_binop; - case Iop_Or64: case Iop_Or32: case Iop_Or16: lop = ARM64lo_OR; goto log_binop; - case Iop_Xor64: case Iop_Xor32: lop = ARM64lo_XOR; goto log_binop; + case Iop_And64: case Iop_And32: + lop = ARM64lo_AND; goto log_binop; + case Iop_Or64: case Iop_Or32: case Iop_Or16: + lop = ARM64lo_OR; goto log_binop; + case Iop_Xor64: case Iop_Xor32: + lop = ARM64lo_XOR; goto log_binop; log_binop: { HReg dst = newVRegI(env); HReg argL = iselIntExpr_R(env, e->Iex.Binop.arg1); @@ -2013,6 +2016,11 @@ static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e ) iselInt128Expr(&rHi,&rLo, env, e->Iex.Unop.arg); return rHi; /* and abandon rLo */ } + case Iop_128to64: { + HReg rHi, rLo; + iselInt128Expr(&rHi,&rLo, env, e->Iex.Unop.arg); + return rLo; /* and abandon rHi */ + } case Iop_8Sto32: case Iop_8Sto64: { IRExpr* arg = e->Iex.Unop.arg; HReg src = iselIntExpr_R(env, arg); @@ -2185,13 +2193,19 @@ static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e ) } return dst; } + case Iop_64HIto32: { + HReg dst = newVRegI(env); + HReg src = iselIntExpr_R(env, e->Iex.Unop.arg); + addInstr(env, ARM64Instr_Shift(dst, src, ARM64RI6_I6(32), + ARM64sh_SHR)); + return dst; + } case Iop_64to32: case Iop_64to16: case Iop_64to8: case Iop_32to16: /* These are no-ops. */ return iselIntExpr_R(env, e->Iex.Unop.arg); - default: break; } @@ -2335,6 +2349,43 @@ static void iselInt128Expr_wrk ( HReg* rHi, HReg* rLo, vassert(e); vassert(typeOfIRExpr(env->type_env,e) == Ity_I128); + /* --------- TEMP --------- */ + if (e->tag == Iex_RdTmp) { + lookupIRTempPair(rHi, rLo, env, e->Iex.RdTmp.tmp); + return; + } + + /* --------- CONST --------- */ + if (e->tag == Iex_Const) { + IRConst* c = e->Iex.Const.con; + vassert(c->tag == Ico_U128); + if (c->Ico.U128 == 0) { + // The only case we need to handle (so far) + HReg zero = newVRegI(env); + addInstr(env, ARM64Instr_Imm64(zero, 0)); + *rHi = *rLo = zero; + return; + } + } + + /* --------- UNARY ops --------- */ + if (e->tag == Iex_Unop) { + switch (e->Iex.Unop.op) { + case Iop_ReinterpV128asI128: { + HReg dstHi = newVRegI(env); + HReg dstLo = newVRegI(env); + HReg src = iselV128Expr(env, e->Iex.Unop.arg); + addInstr(env, ARM64Instr_VXfromQ(dstHi, src, 1)); + addInstr(env, ARM64Instr_VXfromQ(dstLo, src, 0)); + *rHi = dstHi; + *rLo = dstLo; + return; + } + default: + break; + } + } + /* --------- BINARY ops --------- */ if (e->tag == Iex_Binop) { switch (e->Iex.Binop.op) { @@ -4086,6 +4137,14 @@ static void iselStmt ( ISelEnv* env, IRStmt* stmt ) addInstr(env, ARM64Instr_VMov(8/*yes, really*/, dst, src)); return; } + if (ty == Ity_I128) { + HReg rHi, rLo, dstHi, dstLo; + iselInt128Expr(&rHi,&rLo, env, stmt->Ist.WrTmp.data); + lookupIRTempPair( &dstHi, &dstLo, env, tmp); + addInstr(env, ARM64Instr_MovI(dstHi, rHi)); + addInstr(env, ARM64Instr_MovI(dstLo, rLo)); + return; + } if (ty == Ity_V128) { HReg src = iselV128Expr(env, stmt->Ist.WrTmp.data); HReg dst = lookupIRTemp(env, tmp); @@ -4183,42 +4242,67 @@ static void iselStmt ( ISelEnv* env, IRStmt* stmt ) /* LL */ IRTemp res = stmt->Ist.LLSC.result; IRType ty = typeOfIRTemp(env->type_env, res); - if (ty == Ity_I64 || ty == Ity_I32 + if (ty == Ity_I128 || ty == Ity_I64 || ty == Ity_I32 || ty == Ity_I16 || ty == Ity_I8) { Int szB = 0; - HReg r_dst = lookupIRTemp(env, res); HReg raddr = iselIntExpr_R(env, stmt->Ist.LLSC.addr); switch (ty) { - case Ity_I8: szB = 1; break; - case Ity_I16: szB = 2; break; - case Ity_I32: szB = 4; break; - case Ity_I64: szB = 8; break; - default: vassert(0); + case Ity_I8: szB = 1; break; + case Ity_I16: szB = 2; break; + case Ity_I32: szB = 4; break; + case Ity_I64: szB = 8; break; + case Ity_I128: szB = 16; break; + default: vassert(0); + } + if (szB == 16) { + HReg r_dstMSword = INVALID_HREG; + HReg r_dstLSword = INVALID_HREG; + lookupIRTempPair(&r_dstMSword, &r_dstLSword, env, res); + addInstr(env, ARM64Instr_MovI(hregARM64_X4(), raddr)); + addInstr(env, ARM64Instr_LdrEXP()); + addInstr(env, ARM64Instr_MovI(r_dstLSword, hregARM64_X2())); + addInstr(env, ARM64Instr_MovI(r_dstMSword, hregARM64_X3())); + } else { + vassert(szB != 0); + HReg r_dst = lookupIRTemp(env, res); + addInstr(env, ARM64Instr_MovI(hregARM64_X4(), raddr)); + addInstr(env, ARM64Instr_LdrEX(szB)); + addInstr(env, ARM64Instr_MovI(r_dst, hregARM64_X2())); } - addInstr(env, ARM64Instr_MovI(hregARM64_X4(), raddr)); - addInstr(env, ARM64Instr_LdrEX(szB)); - addInstr(env, ARM64Instr_MovI(r_dst, hregARM64_X2())); return; } goto stmt_fail; } else { /* SC */ IRType tyd = typeOfIRExpr(env->type_env, stmt->Ist.LLSC.storedata); - if (tyd == Ity_I64 || tyd == Ity_I32 + if (tyd == Ity_I128 || tyd == Ity_I64 || tyd == Ity_I32 || tyd == Ity_I16 || tyd == Ity_I8) { Int szB = 0; - HReg rD = iselIntExpr_R(env, stmt->Ist.LLSC.storedata); HReg rA = iselIntExpr_R(env, stmt->Ist.LLSC.addr); switch (tyd) { - case Ity_I8: szB = 1; break; - case Ity_I16: szB = 2; break; - case Ity_I32: szB = 4; break; - case Ity_I64: szB = 8; break; - default: vassert(0); + case Ity_I8: szB = 1; break; + case Ity_I16: szB = 2; break; + case Ity_I32: szB = 4; break; + case Ity_I64: szB = 8; break; + case Ity_I128: szB = 16; break; + default: vassert(0); + } + if (szB == 16) { + HReg rD_MSword = INVALID_HREG; + HReg rD_LSword = INVALID_HREG; + iselInt128Expr(&rD_MSword, + &rD_LSword, env, stmt->Ist.LLSC.storedata); + addInstr(env, ARM64Instr_MovI(hregARM64_X2(), rD_LSword)); + addInstr(env, ARM64Instr_MovI(hregARM64_X3(), rD_MSword)); + addInstr(env, ARM64Instr_MovI(hregARM64_X4(), rA)); + addInstr(env, ARM64Instr_StrEXP()); + } else { + vassert(szB != 0); + HReg rD = iselIntExpr_R(env, stmt->Ist.LLSC.storedata); + addInstr(env, ARM64Instr_MovI(hregARM64_X2(), rD)); + addInstr(env, ARM64Instr_MovI(hregARM64_X4(), rA)); + addInstr(env, ARM64Instr_StrEX(szB)); } - addInstr(env, ARM64Instr_MovI(hregARM64_X2(), rD)); - addInstr(env, ARM64Instr_MovI(hregARM64_X4(), rA)); - addInstr(env, ARM64Instr_StrEX(szB)); } else { goto stmt_fail; } @@ -4243,10 +4327,10 @@ static void iselStmt ( ISelEnv* env, IRStmt* stmt ) /* --------- ACAS --------- */ case Ist_CAS: { - if (stmt->Ist.CAS.details->oldHi == IRTemp_INVALID) { + IRCAS* cas = stmt->Ist.CAS.details; + if (cas->oldHi == IRTemp_INVALID && cas->end == Iend_LE) { /* "normal" singleton CAS */ UChar sz; - IRCAS* cas = stmt->Ist.CAS.details; IRType ty = typeOfIRExpr(env->type_env, cas->dataLo); switch (ty) { case Ity_I64: sz = 8; break; @@ -4281,10 +4365,9 @@ static void iselStmt ( ISelEnv* env, IRStmt* stmt ) addInstr(env, ARM64Instr_MovI(rOld, rResult)); return; } - else { + if (cas->oldHi != IRTemp_INVALID && cas->end == Iend_LE) { /* Paired register CAS, i.e. CASP */ UChar sz; - IRCAS* cas = stmt->Ist.CAS.details; IRType ty = typeOfIRExpr(env->type_env, cas->dataLo); switch (ty) { case Ity_I64: sz = 8; break; diff --git a/VEX/priv/ir_defs.c b/VEX/priv/ir_defs.c index 25566c41cc..2d82c41a1a 100644 --- a/VEX/priv/ir_defs.c +++ b/VEX/priv/ir_defs.c @@ -76,6 +76,7 @@ void ppIRConst ( const IRConst* con ) case Ico_U16: vex_printf( "0x%x:I16", (UInt)(con->Ico.U16)); break; case Ico_U32: vex_printf( "0x%x:I32", (UInt)(con->Ico.U32)); break; case Ico_U64: vex_printf( "0x%llx:I64", (ULong)(con->Ico.U64)); break; + case Ico_U128: vex_printf( "I128{0x%04x}", (UInt)(con->Ico.U128)); break; case Ico_F32: u.f32 = con->Ico.F32; vex_printf( "F32{0x%x}", u.i32); break; @@ -2266,6 +2267,13 @@ IRConst* IRConst_U64 ( ULong u64 ) c->Ico.U64 = u64; return c; } +IRConst* IRConst_U128 ( UShort con ) +{ + IRConst* c = LibVEX_Alloc_inline(sizeof(IRConst)); + c->tag = Ico_U128; + c->Ico.U128 = con; + return c; +} IRConst* IRConst_F32 ( Float f32 ) { IRConst* c = LibVEX_Alloc_inline(sizeof(IRConst)); @@ -4230,6 +4238,7 @@ IRType typeOfIRConst ( const IRConst* con ) case Ico_U16: return Ity_I16; case Ico_U32: return Ity_I32; case Ico_U64: return Ity_I64; + case Ico_U128: return Ity_I128; case Ico_F32: return Ity_F32; case Ico_F32i: return Ity_F32; case Ico_F64: return Ity_F64; @@ -5129,7 +5138,7 @@ void tcStmt ( const IRSB* bb, const IRStmt* stmt, IRType gWordTy ) tyRes = typeOfIRTemp(tyenv, stmt->Ist.LLSC.result); if (stmt->Ist.LLSC.storedata == NULL) { /* it's a LL */ - if (tyRes != Ity_I64 && tyRes != Ity_I32 + if (tyRes != Ity_I128 && tyRes != Ity_I64 && tyRes != Ity_I32 && tyRes != Ity_I16 && tyRes != Ity_I8) sanityCheckFail(bb,stmt,"Ist.LLSC(LL).result :: bogus"); } else { @@ -5137,7 +5146,7 @@ void tcStmt ( const IRSB* bb, const IRStmt* stmt, IRType gWordTy ) if (tyRes != Ity_I1) sanityCheckFail(bb,stmt,"Ist.LLSC(SC).result: not :: Ity_I1"); tyData = typeOfIRExpr(tyenv, stmt->Ist.LLSC.storedata); - if (tyData != Ity_I64 && tyData != Ity_I32 + if (tyData != Ity_I128 && tyData != Ity_I64 && tyData != Ity_I32 && tyData != Ity_I16 && tyData != Ity_I8) sanityCheckFail(bb,stmt, "Ist.LLSC(SC).result :: storedata bogus"); @@ -5385,6 +5394,7 @@ Int sizeofIRType ( IRType ty ) IRType integerIRTypeOfSize ( Int szB ) { switch (szB) { + case 16: return Ity_I128; case 8: return Ity_I64; case 4: return Ity_I32; case 2: return Ity_I16; diff --git a/VEX/pub/libvex_guest_arm64.h b/VEX/pub/libvex_guest_arm64.h index 39b6ecdc2e..91d06bd754 100644 --- a/VEX/pub/libvex_guest_arm64.h +++ b/VEX/pub/libvex_guest_arm64.h @@ -157,14 +157,18 @@ typedef note of bits 23 and 22. */ UInt guest_FPCR; - /* Fallback LL/SC support. See bugs 344524 and 369459. */ - ULong guest_LLSC_SIZE; // 0==no current transaction, else 1,2,4 or 8. + /* Fallback LL/SC support. See bugs 344524 and 369459. _LO64 and _HI64 + contain the original contents of _ADDR+0 .. _ADDR+15, but only _SIZE + number of bytes of it. The remaining 16-_SIZE bytes of them must be + zero. */ + ULong guest_LLSC_SIZE; // 0==no current transaction, else 1,2,4,8 or 16. ULong guest_LLSC_ADDR; // Address of transaction. - ULong guest_LLSC_DATA; // Original value at _ADDR, zero-extended. + ULong guest_LLSC_DATA_LO64; // Original value at _ADDR+0. + ULong guest_LLSC_DATA_HI64; // Original value at _ADDR+8. /* Padding to make it have an 16-aligned size */ /* UInt pad_end_0; */ - ULong pad_end_1; + /* ULong pad_end_1; */ } VexGuestARM64State; diff --git a/VEX/pub/libvex_ir.h b/VEX/pub/libvex_ir.h index deaa044c13..85805bb69b 100644 --- a/VEX/pub/libvex_ir.h +++ b/VEX/pub/libvex_ir.h @@ -269,6 +269,8 @@ typedef Ico_U16, Ico_U32, Ico_U64, + Ico_U128, /* 128-bit restricted integer constant, + same encoding scheme as V128 */ Ico_F32, /* 32-bit IEEE754 floating */ Ico_F32i, /* 32-bit unsigned int to be interpreted literally as a IEEE754 single value. */ @@ -295,6 +297,7 @@ typedef UShort U16; UInt U32; ULong U64; + UShort U128; Float F32; UInt F32i; Double F64; @@ -311,6 +314,7 @@ extern IRConst* IRConst_U8 ( UChar ); extern IRConst* IRConst_U16 ( UShort ); extern IRConst* IRConst_U32 ( UInt ); extern IRConst* IRConst_U64 ( ULong ); +extern IRConst* IRConst_U128 ( UShort ); extern IRConst* IRConst_F32 ( Float ); extern IRConst* IRConst_F32i ( UInt ); extern IRConst* IRConst_F64 ( Double ); diff --git a/memcheck/mc_machine.c b/memcheck/mc_machine.c index 919c7fae88..176c8e5cb9 100644 --- a/memcheck/mc_machine.c +++ b/memcheck/mc_machine.c @@ -1115,9 +1115,10 @@ static Int get_otrack_shadow_offset_wrk ( Int offset, Int szB ) if (o == GOF(CMSTART) && sz == 8) return -1; // untracked if (o == GOF(CMLEN) && sz == 8) return -1; // untracked - if (o == GOF(LLSC_SIZE) && sz == 8) return -1; // untracked - if (o == GOF(LLSC_ADDR) && sz == 8) return o; - if (o == GOF(LLSC_DATA) && sz == 8) return o; + if (o == GOF(LLSC_SIZE) && sz == 8) return -1; // untracked + if (o == GOF(LLSC_ADDR) && sz == 8) return o; + if (o == GOF(LLSC_DATA_LO64) && sz == 8) return o; + if (o == GOF(LLSC_DATA_HI64) && sz == 8) return o; VG_(printf)("MC_(get_otrack_shadow_offset)(arm64)(off=%d,sz=%d)\n", offset,szB); diff --git a/memcheck/mc_translate.c b/memcheck/mc_translate.c index c6fd2653f4..72ccb3c8c6 100644 --- a/memcheck/mc_translate.c +++ b/memcheck/mc_translate.c @@ -5497,8 +5497,11 @@ IRAtom* expr2vbits_Load_WRK ( MCEnv* mce, the address (shadow) to 'defined' following the test. */ complainIfUndefined( mce, addr, guard ); - /* Now cook up a call to the relevant helper function, to read the - data V bits from shadow memory. */ + /* Now cook up a call to the relevant helper function, to read the data V + bits from shadow memory. Note that I128 loads are done by pretending + we're doing a V128 load, and then converting the resulting V128 vbits + word to an I128, right at the end of this function -- see `castedToI128` + below. (It's only a minor hack :-) This pertains to bug 444399. */ ty = shadowTypeV(ty); void* helper = NULL; @@ -5511,6 +5514,7 @@ IRAtom* expr2vbits_Load_WRK ( MCEnv* mce, hname = "MC_(helperc_LOADV256le)"; ret_via_outparam = True; break; + case Ity_I128: // fallthrough. See comment above. case Ity_V128: helper = &MC_(helperc_LOADV128le); hname = "MC_(helperc_LOADV128le)"; ret_via_outparam = True; @@ -5576,7 +5580,7 @@ IRAtom* expr2vbits_Load_WRK ( MCEnv* mce, /* We need to have a place to park the V bits we're just about to read. */ - IRTemp datavbits = newTemp(mce, ty, VSh); + IRTemp datavbits = newTemp(mce, ty == Ity_I128 ? Ity_V128 : ty, VSh); /* Here's the call. */ IRDirty* di; @@ -5603,7 +5607,14 @@ IRAtom* expr2vbits_Load_WRK ( MCEnv* mce, } stmt( 'V', mce, IRStmt_Dirty(di) ); - return mkexpr(datavbits); + if (ty == Ity_I128) { + IRAtom* castedToI128 + = assignNew('V', mce, Ity_I128, + unop(Iop_ReinterpV128asI128, mkexpr(datavbits))); + return castedToI128; + } else { + return mkexpr(datavbits); + } } @@ -5631,6 +5642,7 @@ IRAtom* expr2vbits_Load ( MCEnv* mce, case Ity_I16: case Ity_I32: case Ity_I64: + case Ity_I128: case Ity_V128: case Ity_V256: return expr2vbits_Load_WRK(mce, end, ty, addr, bias, guard); @@ -5928,6 +5940,7 @@ void do_shadow_Store ( MCEnv* mce, c = IRConst_V256(V_BITS32_DEFINED); break; case Ity_V128: // V128 weirdness -- used twice c = IRConst_V128(V_BITS16_DEFINED); break; + case Ity_I128: c = IRConst_U128(V_BITS16_DEFINED); break; case Ity_I64: c = IRConst_U64 (V_BITS64_DEFINED); break; case Ity_I32: c = IRConst_U32 (V_BITS32_DEFINED); break; case Ity_I16: c = IRConst_U16 (V_BITS16_DEFINED); break; @@ -5948,6 +5961,7 @@ void do_shadow_Store ( MCEnv* mce, switch (ty) { case Ity_V256: /* we'll use the helper four times */ case Ity_V128: /* we'll use the helper twice */ + case Ity_I128: /* we'll use the helper twice */ case Ity_I64: helper = &MC_(helperc_STOREV64le); hname = "MC_(helperc_STOREV64le)"; break; @@ -6051,9 +6065,9 @@ void do_shadow_Store ( MCEnv* mce, stmt( 'V', mce, IRStmt_Dirty(diQ3) ); } - else if (UNLIKELY(ty == Ity_V128)) { + else if (UNLIKELY(ty == Ity_V128 || ty == Ity_I128)) { - /* V128-bit case */ + /* V128/I128-bit case */ /* See comment in next clause re 64-bit regparms */ /* also, need to be careful about endianness */ @@ -6062,6 +6076,7 @@ void do_shadow_Store ( MCEnv* mce, IRAtom *addrLo64, *addrHi64; IRAtom *vdataLo64, *vdataHi64; IRAtom *eBiasLo64, *eBiasHi64; + IROp opGetLO64, opGetHI64; if (end == Iend_LE) { offLo64 = 0; @@ -6071,9 +6086,17 @@ void do_shadow_Store ( MCEnv* mce, offHi64 = 0; } + if (ty == Ity_V128) { + opGetLO64 = Iop_V128to64; + opGetHI64 = Iop_V128HIto64; + } else { + opGetLO64 = Iop_128to64; + opGetHI64 = Iop_128HIto64; + } + eBiasLo64 = tyAddr==Ity_I32 ? mkU32(bias+offLo64) : mkU64(bias+offLo64); addrLo64 = assignNew('V', mce, tyAddr, binop(mkAdd, addr, eBiasLo64) ); - vdataLo64 = assignNew('V', mce, Ity_I64, unop(Iop_V128to64, vdata)); + vdataLo64 = assignNew('V', mce, Ity_I64, unop(opGetLO64, vdata)); diLo64 = unsafeIRDirty_0_N( 1/*regparms*/, hname, VG_(fnptr_to_fnentry)( helper ), @@ -6081,7 +6104,7 @@ void do_shadow_Store ( MCEnv* mce, ); eBiasHi64 = tyAddr==Ity_I32 ? mkU32(bias+offHi64) : mkU64(bias+offHi64); addrHi64 = assignNew('V', mce, tyAddr, binop(mkAdd, addr, eBiasHi64) ); - vdataHi64 = assignNew('V', mce, Ity_I64, unop(Iop_V128HIto64, vdata)); + vdataHi64 = assignNew('V', mce, Ity_I64, unop(opGetHI64, vdata)); diHi64 = unsafeIRDirty_0_N( 1/*regparms*/, hname, VG_(fnptr_to_fnentry)( helper ), @@ -6888,7 +6911,7 @@ static void do_shadow_LLSC ( MCEnv* mce, /* Just treat this as a normal load, followed by an assignment of the value to .result. */ /* Stay sane */ - tl_assert(resTy == Ity_I64 || resTy == Ity_I32 + tl_assert(resTy == Ity_I128 || resTy == Ity_I64 || resTy == Ity_I32 || resTy == Ity_I16 || resTy == Ity_I8); assign( 'V', mce, resTmp, expr2vbits_Load( @@ -6899,7 +6922,7 @@ static void do_shadow_LLSC ( MCEnv* mce, /* Stay sane */ IRType dataTy = typeOfIRExpr(mce->sb->tyenv, stStoredata); - tl_assert(dataTy == Ity_I64 || dataTy == Ity_I32 + tl_assert(dataTy == Ity_I128 || dataTy == Ity_I64 || dataTy == Ity_I32 || dataTy == Ity_I16 || dataTy == Ity_I8); do_shadow_Store( mce, stEnd, stAddr, 0/* addr bias */, @@ -7684,7 +7707,7 @@ static void schemeS ( MCEnv* mce, IRStmt* st ) = typeOfIRTemp(mce->sb->tyenv, st->Ist.LLSC.result); IRExpr* vanillaLoad = IRExpr_Load(st->Ist.LLSC.end, resTy, st->Ist.LLSC.addr); - tl_assert(resTy == Ity_I64 || resTy == Ity_I32 + tl_assert(resTy == Ity_I128 || resTy == Ity_I64 || resTy == Ity_I32 || resTy == Ity_I16 || resTy == Ity_I8); assign( 'B', mce, findShadowTmpB(mce, st->Ist.LLSC.result), schemeE(mce, vanillaLoad)); diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 449710020a..2b43ef7d75 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -90,6 +90,7 @@ EXTRA_DIST = \ addressable.stderr.exp addressable.stdout.exp addressable.vgtest \ atomic_incs.stderr.exp atomic_incs.vgtest \ atomic_incs.stdout.exp-32bit atomic_incs.stdout.exp-64bit \ + atomic_incs.stdout.exp-64bit-and-128bit \ badaddrvalue.stderr.exp \ badaddrvalue.stdout.exp badaddrvalue.vgtest \ exit_on_first_error.stderr.exp \ diff --git a/memcheck/tests/atomic_incs.c b/memcheck/tests/atomic_incs.c index f931750f47..1c738c530d 100644 --- a/memcheck/tests/atomic_incs.c +++ b/memcheck/tests/atomic_incs.c @@ -22,6 +22,17 @@ #define NNN 3456987 #define IS_8_ALIGNED(_ptr) (0 == (((unsigned long)(_ptr)) & 7)) +#define IS_16_ALIGNED(_ptr) (0 == (((unsigned long)(_ptr)) & 15)) + +// U128 from libvex_basictypes.h is a 4-x-UInt array, which is a bit +// inconvenient, hence: +typedef + struct { + // assuming little-endianness + unsigned long long int lo64; + unsigned long long int hi64; + } + MyU128; __attribute__((noinline)) void atomic_add_8bit ( char* p, int n ) @@ -712,6 +723,40 @@ __attribute__((noinline)) void atomic_add_64bit ( long long int* p, int n ) #endif } +__attribute__((noinline)) void atomic_add_128bit ( MyU128* p, + unsigned long long int n ) +{ +#if defined(VGA_x86) || defined(VGA_ppc32) || defined(VGA_mips32) \ + || defined (VGA_nanomips) || defined(VGA_mips64) \ + || defined(VGA_amd64) \ + || defined(VGA_ppc64be) || defined(VGA_ppc64le) \ + || defined(VGA_arm) \ + || defined(VGA_s390x) + /* do nothing; is not supported */ +#elif defined(VGA_arm64) + unsigned long long int block[3] + = { (unsigned long long int)p, (unsigned long long int)n, + 0xFFFFFFFFFFFFFFFFULL}; + do { + __asm__ __volatile__( + "mov x5, %0" "\n\t" // &block[0] + "ldr x9, [x5, #0]" "\n\t" // p + "ldr x10, [x5, #8]" "\n\t" // n + "ldxp x7, x8, [x9]" "\n\t" + "adds x7, x7, x10" "\n\t" + "adc x8, x8, xzr" "\n\t" + "stxp w4, x7, x8, [x9]" "\n\t" + "str x4, [x5, #16]" "\n\t" + : /*out*/ + : /*in*/ "r"(&block[0]) + : /*trash*/ "memory", "cc", "x5", "x7", "x8", "x9", "x10", "x4" + ); + } while (block[2] != 0); +#else +# error "Unsupported arch" +#endif +} + int main ( int argc, char** argv ) { int i, status; @@ -720,8 +765,12 @@ int main ( int argc, char** argv ) short* p16; int* p32; long long int* p64; + MyU128* p128; pid_t child, p2; + assert(sizeof(MyU128) == 16); + assert(sysconf(_SC_PAGESIZE) >= 4096); + printf("parent, pre-fork\n"); page = mmap( 0, sysconf(_SC_PAGESIZE), @@ -736,11 +785,13 @@ int main ( int argc, char** argv ) p16 = (short*)(page+256); p32 = (int*)(page+512); p64 = (long long int*)(page+768); + p128 = (MyU128*)(page+1024); assert( IS_8_ALIGNED(p8) ); assert( IS_8_ALIGNED(p16) ); assert( IS_8_ALIGNED(p32) ); assert( IS_8_ALIGNED(p64) ); + assert( IS_16_ALIGNED(p128) ); memset(page, 0, 1024); @@ -748,6 +799,7 @@ int main ( int argc, char** argv ) *p16 = 0; *p32 = 0; *p64 = 0; + p128->lo64 = p128->hi64 = 0; child = fork(); if (child == -1) { @@ -763,6 +815,7 @@ int main ( int argc, char** argv ) atomic_add_16bit(p16, 1); atomic_add_32bit(p32, 1); atomic_add_64bit(p64, 98765 ); /* ensure we hit the upper 32 bits */ + atomic_add_128bit(p128, 0x1000000013374771ULL); // ditto re upper 64 } return 1; /* NOTREACHED */ @@ -778,6 +831,7 @@ int main ( int argc, char** argv ) atomic_add_16bit(p16, 1); atomic_add_32bit(p32, 1); atomic_add_64bit(p64, 98765 ); /* ensure we hit the upper 32 bits */ + atomic_add_128bit(p128, 0x1000000013374771ULL); // ditto re upper 64 } p2 = waitpid(child, &status, 0); @@ -788,11 +842,17 @@ int main ( int argc, char** argv ) printf("FINAL VALUES: 8 bit %d, 16 bit %d, 32 bit %d, 64 bit %lld\n", (int)(*(signed char*)p8), (int)(*p16), *p32, *p64 ); + printf(" 128 bit 0x%016llx:0x%016llx\n", + p128->hi64, p128->lo64); if (-74 == (int)(*(signed char*)p8) && 32694 == (int)(*p16) && 6913974 == *p32 - && (0LL == *p64 || 682858642110LL == *p64)) { + && (0LL == *p64 || 682858642110LL == *p64) + && ((0 == p128->hi64 && 0 == p128->lo64) + || (0x00000000000697fb == p128->hi64 + && 0x6007eb426316d956ULL == p128->lo64)) + ) { printf("PASS\n"); } else { printf("FAIL -- see source code for expected values\n"); diff --git a/memcheck/tests/atomic_incs.stdout.exp-32bit b/memcheck/tests/atomic_incs.stdout.exp-32bit index c5b8781e55..55e5044b55 100644 --- a/memcheck/tests/atomic_incs.stdout.exp-32bit +++ b/memcheck/tests/atomic_incs.stdout.exp-32bit @@ -3,5 +3,6 @@ child parent, pre-fork parent FINAL VALUES: 8 bit -74, 16 bit 32694, 32 bit 6913974, 64 bit 0 + 128 bit 0x0000000000000000:0x0000000000000000 PASS parent exits diff --git a/memcheck/tests/atomic_incs.stdout.exp-64bit b/memcheck/tests/atomic_incs.stdout.exp-64bit index 82405c5209..ca2f4fc970 100644 --- a/memcheck/tests/atomic_incs.stdout.exp-64bit +++ b/memcheck/tests/atomic_incs.stdout.exp-64bit @@ -3,5 +3,6 @@ child parent, pre-fork parent FINAL VALUES: 8 bit -74, 16 bit 32694, 32 bit 6913974, 64 bit 682858642110 + 128 bit 0x0000000000000000:0x0000000000000000 PASS parent exits diff --git a/memcheck/tests/atomic_incs.stdout.exp-64bit-and-128bit b/memcheck/tests/atomic_incs.stdout.exp-64bit-and-128bit new file mode 100644 index 0000000000..ef65809179 --- /dev/null +++ b/memcheck/tests/atomic_incs.stdout.exp-64bit-and-128bit @@ -0,0 +1,8 @@ +parent, pre-fork +child +parent, pre-fork +parent +FINAL VALUES: 8 bit -74, 16 bit 32694, 32 bit 6913974, 64 bit 682858642110 + 128 bit 0x00000000000697fb:0x6007eb426316d956 +PASS +parent exits diff --git a/none/tests/arm64/Makefile.am b/none/tests/arm64/Makefile.am index 00cbfa52c1..9efb49b276 100644 --- a/none/tests/arm64/Makefile.am +++ b/none/tests/arm64/Makefile.am @@ -12,7 +12,10 @@ EXTRA_DIST = \ atomics_v81.stdout.exp atomics_v81.stderr.exp atomics_v81.vgtest \ simd_v81.stdout.exp simd_v81.stderr.exp simd_v81.vgtest \ fmadd_sub.stdout.exp fmadd_sub.stderr.exp fmadd_sub.vgtest \ - fp_and_simd_v82.stdout.exp fp_and_simd_v82.stderr.exp fp_and_simd_v82.vgtest + fp_and_simd_v82.stdout.exp fp_and_simd_v82.stderr.exp \ + fp_and_simd_v82.vgtest \ + ldxp_stxp.stdout.exp ldxp_stxp.stderr.exp \ + ldxp_stxp_basisimpl.vgtest ldxp_stxp_fallbackimpl.vgtest check_PROGRAMS = \ allexec \ @@ -20,7 +23,8 @@ check_PROGRAMS = \ fp_and_simd \ integer \ memory \ - fmadd_sub + fmadd_sub \ + ldxp_stxp if BUILD_ARMV8_CRC_TESTS check_PROGRAMS += crc32 diff --git a/none/tests/arm64/ldxp_stxp.c b/none/tests/arm64/ldxp_stxp.c new file mode 100644 index 0000000000..b5f6ea121d --- /dev/null +++ b/none/tests/arm64/ldxp_stxp.c @@ -0,0 +1,93 @@ + +/* Note, this is only a basic smoke test of LD{A}XP and ST{L}XP. Their + atomicity properties are tested by memcheck/tests/atomic_incs.c. */ + +#include <stdio.h> +#include <stdlib.h> +#include <malloc.h> +#include <assert.h> + +typedef unsigned int UInt; +typedef unsigned long long int ULong; + + +void initBlock ( ULong* block ) +{ + block[0] = 0x0001020304050607ULL; + block[1] = 0x1011121314151617ULL; + block[2] = 0x2021222324252627ULL; + block[3] = 0x3031323334353637ULL; + block[4] = 0x4041424344454647ULL; + block[5] = 0x5051525354555657ULL; +} + +void printBlock ( const char* who, + ULong* block, ULong rt1contents, ULong rt2contents, + UInt zeroIfSuccess ) +{ + printf("Block %s (%s)\n", who, zeroIfSuccess == 0 ? "success" : "FAILURE" ); + for (int i = 0; i < 6; i++) { + printf("0x%016llx\n", block[i]); + } + printf("0x%016llx rt1contents\n", rt1contents); + printf("0x%016llx rt2contents\n", rt2contents); + printf("\n"); +} + +int main ( void ) +{ + ULong* block = memalign(16, 6 * sizeof(ULong)); + assert(block); + + ULong rt1in, rt2in, rt1out, rt2out; + UInt scRes; + + // Do ldxp then stxp with x-registers + initBlock(block); + rt1in = 0x5555666677778888ULL; + rt2in = 0xAAAA9999BBBB0000ULL; + rt1out = 0x1111222233334444ULL; + rt2out = 0xFFFFEEEEDDDDCCCCULL; + scRes = 0x55555555; + __asm__ __volatile__( + "ldxp %1, %2, [%5]" "\n\t" + "stxp %w0, %3, %4, [%5]" "\n\t" + : /*OUT*/ + "=&r"(scRes), // %0 + "=&r"(rt1out), // %1 + "=&r"(rt2out) // %2 + : /*IN*/ + "r"(rt1in), // %3 + "r"(rt2in), // %4 + "r"(&block[2]) // %5 + : /*TRASH*/ + "memory","cc" + ); + printBlock("after ldxp/stxp 2x64-bit", block, rt1out, rt2out, scRes); + + // Do ldxp then stxp with w-registers + initBlock(block); + rt1in = 0x5555666677778888ULL; + rt2in = 0xAAAA9999BBBB0000ULL; + rt1out = 0x1111222233334444ULL; + rt2out = 0xFFFFEEEEDDDDCCCCULL; + scRes = 0x55555555; + __asm__ __volatile__( + "ldxp %w1, %w2, [%5]" "\n\t" + "stxp %w0, %w3, %w4, [%5]" "\n\t" + : /*OUT*/ + "=&r"(scRes), // %0 + "=&r"(rt1out), // %1 + "=&r"(rt2out) // %2 + : /*IN*/ + "r"(rt1in), // %3 + "r"(rt2in), // %4 + "r"(&block[2]) // %5 + : /*TRASH*/ + "memory","cc" + ); + printBlock("after ldxp/stxp 2x32-bit", block, rt1out, rt2out, scRes); + + free(block); + return 0; +} diff --git a/none/tests/arm64/ldxp_stxp_basisimpl.stderr.exp b/none/tests/arm64/ldxp_stxp_basisimpl.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/none/tests/arm64/ldxp_stxp_basisimpl.stdout.exp b/none/tests/arm64/ldxp_stxp_basisimpl.stdout.exp new file mode 100644 index 0000000000..f269ecdcc9 --- /dev/null +++ b/none/tests/arm64/ldxp_stxp_basisimpl.stdout.exp @@ -0,0 +1,20 @@ +Block after ldxp/stxp 2x64-bit (success) +0x0001020304050607 +0x1011121314151617 +0x5555666677778888 +0xaaaa9999bbbb0000 +0x4041424344454647 +0x5051525354555657 +0x2021222324252627 rt1contents +0x3031323334353637 rt2contents + +Block after ldxp/stxp 2x32-bit (success) +0x0001020304050607 +0x1011121314151617 +0xbbbb000077778888 +0x3031323334353637 +0x4041424344454647 +0x5051525354555657 +0x0000000024252627 rt1contents +0x0000000020212223 rt2contents + diff --git a/none/tests/arm64/ldxp_stxp_basisimpl.vgtest b/none/tests/arm64/ldxp_stxp_basisimpl.vgtest new file mode 100644 index 0000000000..29133729a4 --- /dev/null +++ b/none/tests/arm64/ldxp_stxp_basisimpl.vgtest @@ -0,0 +1,2 @@ +prog: ldxp_stxp +vgopts: -q diff --git a/none/tests/arm64/ldxp_stxp_fallbackimpl.stderr.exp b/none/tests/arm64/ldxp_stxp_fallbackimpl.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/none/tests/arm64/ldxp_stxp_fallbackimpl.stdout.exp b/none/tests/arm64/ldxp_stxp_fallbackimpl.stdout.exp new file mode 100644 index 0000000000..f269ecdcc9 --- /dev/null +++ b/none/tests/arm64/ldxp_stxp_fallbackimpl.stdout.exp @@ -0,0 +1,20 @@ +Block after ldxp/stxp 2x64-bit (success) +0x0001020304050607 +0x1011121314151617 +0x5555666677778888 +0xaaaa9999bbbb0000 +0x4041424344454647 +0x5051525354555657 +0x2021222324252627 rt1contents +0x3031323334353637 rt2contents + +Block after ldxp/stxp 2x32-bit (success) +0x0001020304050607 +0x1011121314151617 +0xbbbb000077778888 +0x3031323334353637 +0x4041424344454647 +0x5051525354555657 +0x0000000024252627 rt1contents +0x0000000020212223 rt2contents + diff --git a/none/tests/arm64/ldxp_stxp_fallbackimpl.vgtest b/none/tests/arm64/ldxp_stxp_fallbackimpl.vgtest new file mode 100644 index 0000000000..474282a038 --- /dev/null +++ b/none/tests/arm64/ldxp_stxp_fallbackimpl.vgtest @@ -0,0 +1,2 @@ +prog: ldxp_stxp +vgopts: -q --sim-hints=fallback-llsc |
|
From: Julian S. <se...@so...> - 2021-11-12 09:44:25
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7dbe2fed72886874f2eaf57dc07929542ae55b58 commit 7dbe2fed72886874f2eaf57dc07929542ae55b58 Author: Julian Seward <js...@ac...> Date: Fri Nov 12 10:40:48 2021 +0100 Bug 445354 - arm64 backend: incorrect code emitted for doubleword CAS. The sequence of instructions emitted by the arm64 backend for doubleword compare-and-swap is incorrect. This could lead to incorrect simulation of the AArch8.1 atomic instructions (CASP, at least). It also causes failures in the upcoming fix for v8.0 support for LD{,A}XP/ST{,L}XP in bug 444399, at least when running with the fallback LL/SC implementation (`--sim-hints=fallback-llsc`, or as autoselected at startup). In the worst case it can cause segfaulting in the generated code, because it could jump backwards unexpectedly far. The problem is the sequence emitted for ARM64in_CASP: * the jump offsets are incorrect, both for `bne out` (x 2) and `cbnz w1, loop`. * using w1 to hold the success indication of the stxp instruction trashes the previous value in x1. But the value in x1 is an output of ARM64in_CASP, hence one of the two output registers is corrupted. That confuses any code downstream that want to inspect those values to find out whether or not the transaction succeeded. The fixes are to * fix the branch offsets * use a different register to hold the stxp success indication. w3 is a convenient check. Diff: --- NEWS | 1 + VEX/priv/host_arm64_defs.c | 21 +++++++++++---------- VEX/priv/host_arm64_defs.h | 9 ++++++++- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index c6e9361a14..55ad93c4cb 100644 --- a/NEWS +++ b/NEWS @@ -48,6 +48,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 444836 PPC, pstq instruction for R=1 is not storing to the correct address. 445032 valgrind/memcheck crash with SIGSEGV when SIGVTALRM timer used and libthr.so associated +445354 arm64 backend: incorrect code emitted for doubleword CAS To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/VEX/priv/host_arm64_defs.c b/VEX/priv/host_arm64_defs.c index 5dccc04954..5657bcab96 100644 --- a/VEX/priv/host_arm64_defs.c +++ b/VEX/priv/host_arm64_defs.c @@ -2271,6 +2271,7 @@ void getRegUsage_ARM64Instr ( HRegUsage* u, const ARM64Instr* i, Bool mode64 ) addHRegUse(u, HRmWrite, hregARM64_X1()); addHRegUse(u, HRmWrite, hregARM64_X9()); addHRegUse(u, HRmWrite, hregARM64_X8()); + addHRegUse(u, HRmWrite, hregARM64_X3()); break; case ARM64in_MFence: return; @@ -4254,16 +4255,16 @@ Int emit_ARM64Instr ( /*MB_MOD*/Bool* is_profInc, -- always: cmp x0, x8 // EB08001F - bne out // 540000E1 (b.ne #28 <out>) + bne out // 540000A1 cmp x1, x9 // EB09003F - bne out // 540000A1 (b.ne #20 <out>) + bne out // 54000061 -- one of: - stxp w1, x6, x7, [x2] // C8211C46 - stxp w1, w6, w7, [x2] // 88211C46 + stxp w3, x6, x7, [x2] // C8231C46 + stxp w3, w6, w7, [x2] // 88231C46 -- always: - cbnz w1, loop // 35FFFE81 (cbnz w1, #-48 <loop>) + cbnz w3, loop // 35FFFF03 out: */ switch (i->ARM64in.CASP.szB) { @@ -4277,15 +4278,15 @@ Int emit_ARM64Instr ( /*MB_MOD*/Bool* is_profInc, default: vassert(0); } *p++ = 0xEB08001F; - *p++ = 0x540000E1; - *p++ = 0xEB09003F; *p++ = 0x540000A1; + *p++ = 0xEB09003F; + *p++ = 0x54000061; switch (i->ARM64in.CASP.szB) { - case 8: *p++ = 0xC8211C46; break; - case 4: *p++ = 0x88211C46; break; + case 8: *p++ = 0xC8231C46; break; + case 4: *p++ = 0x88231C46; break; default: vassert(0); } - *p++ = 0x35FFFE81; + *p++ = 0x35FFFF03; goto done; } case ARM64in_MFence: { diff --git a/VEX/priv/host_arm64_defs.h b/VEX/priv/host_arm64_defs.h index f0737f2c68..01fb5708e0 100644 --- a/VEX/priv/host_arm64_defs.h +++ b/VEX/priv/host_arm64_defs.h @@ -720,6 +720,7 @@ typedef Int szB; /* 1, 2, 4 or 8 */ } StrEX; /* x1 = CAS(x3(addr), x5(expected) -> x7(new)), + and trashes x8 where x1[8*szB-1 : 0] == x5[8*szB-1 : 0] indicates success, x1[8*szB-1 : 0] != x5[8*szB-1 : 0] indicates failure. Uses x8 as scratch (but that's not allocatable). @@ -738,7 +739,7 @@ typedef -- if branch taken, failure; x1[[8*szB-1 : 0] holds old value -- attempt to store stxr w8, x7, [x3] - -- if store successful, x1==0, so the eor is "x1 := x5" + -- if store successful, x8==0 -- if store failed, branch back and try again. cbne w8, loop after: @@ -746,6 +747,12 @@ typedef struct { Int szB; /* 1, 2, 4 or 8 */ } CAS; + /* Doubleworld CAS, 2 x 32 bit or 2 x 64 bit + x0(oldLSW),x1(oldMSW) + = DCAS(x2(addr), x4(expectedLSW),x5(expectedMSW) + -> x6(newLSW),x7(newMSW)) + and trashes x8, x9 and x3 + */ struct { Int szB; /* 4 or 8 */ } CASP; |
|
From: Paul F. <pj...@wa...> - 2021-11-12 07:03:45
|
On 11/12/21 01:13, Nicholas Nethercote wrote:
> I copied the memcheck/tests/demangle.cpp test. Do you get the same
> failure for that test?
>
> Nick
>
Hi Nick
Indeed that testcase is not really testing much with clang either.
I'll change them both to use double free and mismatch free, like below
but without the commented out code. The actual error isn't important I
suppose - we just want a stack trace with the demangling.
A+
Paul
diff --git a/memcheck/tests/demangle-rust.c b/memcheck/tests/demangle-rust.c
index f2a458b2a..1133563b0 100644
--- a/memcheck/tests/demangle-rust.c
+++ b/memcheck/tests/demangle-rust.c
@@ -9,7 +9,10 @@
// A v0 symbol that demangles to: <rustc_middle::ty::PredicateKind as
rustc_mid
dle::ty::fold::TypeFoldable>::fold_with::<rustc_infer::infer::resolve::Opportuni
sticVarResolver>
int
_RINvYNtNtCs4uGc65yWeeX_12rustc_middle2ty13PredicateKindNtNtB5_4fold12TypeF
oldable9fold_withNtNtNtCsgI90OQiJWEs_11rustc_infer5infer7resolve24OpportunisticV
arResolverECsdozMG8X9FIu_21rustc_trait_selection(int *p)
{
- return *p ? 1 : 2;
+// return *p ? 1 : 2;
+ free(p);
+ free(p);
+ return 1;
}
and
diff --git a/memcheck/tests/demangle.cpp b/memcheck/tests/demangle.cpp
index ff15fe12c..918478a21 100644
--- a/memcheck/tests/demangle.cpp
+++ b/memcheck/tests/demangle.cpp
@@ -1,4 +1,5 @@
// Simple smoke test to see that the demangler is actually working
+#include <cstdlib>
namespace abc {
template <typename T1, typename T2>
@@ -6,7 +7,9 @@class def {
public:
T1 xyzzy(T1 *p, T2 *)
{
- return *p ? 10 : 20;
+// return *p ? 10 : 20;
+ free(p);
+ return 10;
}
};
|
|
From: Nicholas N. <n.n...@gm...> - 2021-11-12 00:14:13
|
I copied the memcheck/tests/demangle.cpp test. Do you get the same failure for that test? Nick On Fri, 12 Nov 2021 at 08:01, Paul Floyd <pj...@wa...> wrote: > > On 11/10/21 00:19, Nicholas Nethercote wrote: > > > https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4831385c6706b377851284adc4c4545fff4c6564 > > > > commit 4831385c6706b377851284adc4c4545fff4c6564 > > Author: Nicholas Nethercote <nne...@ap...> > > Date: Tue Nov 9 12:30:07 2021 +1100 > > > > Fix Rust v0 demangling. > > > > It's currently broken due to a silly test that prevents the v0 > > demangling code from even running. > > > > The commit also adds a test, to avoid such problems in the future. > > > Hi > > This test fails with clang. I haven't looked as the assembler, but from > experience > > > int > > _RINvYNtNtCs4uGc65yWeeX_12rustc_middle2ty13PredicateKindNtNtB5_4fold12TypeFo > ldable9fold_withNtNtNtCsgI90OQiJWEs_11rustc_infer5infer7resolve24OpportunisticVa > > > rResolverECsdozMG8X9FIu_21rustc_trait_selection(int *p) > { > return *p ? 1 : 2; > } > > probably generates a cmov with clang and test / jump conditional with GCC. > > This delays the error, so all I get is > > > Syscall param exit(status) contains uninitialised byte(s) > ... > > A+ > > Paul > > > > > > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |
|
From: Paul F. <pj...@wa...> - 2021-11-11 21:01:06
|
On 11/10/21 00:19, Nicholas Nethercote wrote: > https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4831385c6706b377851284adc4c4545fff4c6564 > > commit 4831385c6706b377851284adc4c4545fff4c6564 > Author: Nicholas Nethercote <nne...@ap...> > Date: Tue Nov 9 12:30:07 2021 +1100 > > Fix Rust v0 demangling. > > It's currently broken due to a silly test that prevents the v0 > demangling code from even running. > > The commit also adds a test, to avoid such problems in the future. Hi This test fails with clang. I haven't looked as the assembler, but from experience int _RINvYNtNtCs4uGc65yWeeX_12rustc_middle2ty13PredicateKindNtNtB5_4fold12TypeFo ldable9fold_withNtNtNtCsgI90OQiJWEs_11rustc_infer5infer7resolve24OpportunisticVa rResolverECsdozMG8X9FIu_21rustc_trait_selection(int *p) { return *p ? 1 : 2; } probably generates a cmov with clang and test / jump conditional with GCC. This delays the error, so all I get is Syscall param exit(status) contains uninitialised byte(s) ... A+ Paul |
|
From: Mark W. <ma...@so...> - 2021-11-11 17:04:00
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=d151907e5d8ff393f4fef126c8ae445ea8813661 commit d151907e5d8ff393f4fef126c8ae445ea8813661 Author: Mark Wielaard <ma...@kl...> Date: Thu Nov 11 18:02:09 2021 +0100 Add demangle-rust to check_PROGRAMS The demangle-rust.vgtest would fail because the demangle-rust binary wasn't build by default. Add it to check_PROGRAMS and define demangle_rust_SOURCES to make sure it is always build. Diff: --- memcheck/tests/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 7837d87c71..449710020a 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -392,6 +392,7 @@ check_PROGRAMS = \ custom_alloc \ custom-overlap \ demangle \ + demangle-rust \ big_debuginfo_symbol \ deep-backtrace \ describe-block \ @@ -505,6 +506,7 @@ endif leak_cpp_interior_SOURCES = leak_cpp_interior.cpp demangle_SOURCES = demangle.cpp +demangle_rust_SOURCES = demangle-rust.c # Suppress various gcc warnings which are correct, but for things # we are actually testing for at runtime. |
|
From: Mark W. <ma...@so...> - 2021-11-10 08:05:36
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=a0ee664023984d14b4044571afbb379e4b1945bb commit a0ee664023984d14b4044571afbb379e4b1945bb Author: Mark Wielaard <ma...@kl...> Date: Wed Nov 10 09:05:20 2021 +0100 Add scalar.stderr.exp-freebsd130-x86 to EXTRA_DIST Diff: --- memcheck/tests/freebsd/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/memcheck/tests/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index c1d675a7a3..d0e6c6cc25 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -34,6 +34,7 @@ EXTRA_DIST = \ scalar.stderr.exp \ scalar.stderr.exp-x86 \ scalar.stderr.exp-freebsd130 \ + scalar.stderr.exp-freebsd130-x86 \ capsicum.vgtest \ capsicum.stderr.exp \ getfh.vgtest \ |
|
From: Mark W. <ma...@so...> - 2021-11-10 08:04:27
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=c1bfa115f985633722f25922d2996c231e8c9d8d commit c1bfa115f985633722f25922d2996c231e8c9d8d Author: Mark Wielaard <ma...@kl...> Date: Wed Nov 10 09:02:36 2021 +0100 Add demangle-rust.vgtest demangle-rust.stderr.exp to EXTRA_DIST Diff: --- memcheck/tests/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index 4d0476e2df..7837d87c71 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -281,6 +281,7 @@ EXTRA_DIST = \ realloc3.stderr.exp realloc3.vgtest \ recursive-merge.stderr.exp recursive-merge.vgtest \ resvn_stack.stderr.exp resvn_stack.vgtest \ + demangle-rust.vgtest demangle-rust.stderr.exp \ sbfragment.stdout.exp sbfragment.stderr.exp sbfragment.vgtest \ sem.stderr.exp sem.vgtest \ sendmsg.stderr.exp sendmsg.stderr.exp-solaris sendmsg.vgtest \ |
|
From: Nicholas N. <nj...@so...> - 2021-11-09 23:19:12
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=4831385c6706b377851284adc4c4545fff4c6564 commit 4831385c6706b377851284adc4c4545fff4c6564 Author: Nicholas Nethercote <nne...@ap...> Date: Tue Nov 9 12:30:07 2021 +1100 Fix Rust v0 demangling. It's currently broken due to a silly test that prevents the v0 demangling code from even running. The commit also adds a test, to avoid such problems in the future. Diff: --- coregrind/m_demangle/demangle.c | 7 ++++++- memcheck/tests/demangle-rust.c | 31 +++++++++++++++++++++++++++++++ memcheck/tests/demangle-rust.stderr.exp | 6 ++++++ memcheck/tests/demangle-rust.vgtest | 2 ++ 4 files changed, 45 insertions(+), 1 deletion(-) diff --git a/coregrind/m_demangle/demangle.c b/coregrind/m_demangle/demangle.c index 16161da2af..3fd7cb75f5 100644 --- a/coregrind/m_demangle/demangle.c +++ b/coregrind/m_demangle/demangle.c @@ -118,8 +118,13 @@ void VG_(demangle) ( Bool do_cxx_demangling, Bool do_z_demangling, } /* Possibly undo (1) */ + // - C++ mangled symbols start with "_Z" (possibly with exceptions?) + // - Rust "legacy" mangled symbols start with "_Z". + // - Rust "v0" mangled symbols start with "_R". + // XXX: the Java/Rust/Ada demangling here probably doesn't work. See + // https://bugs.kde.org/show_bug.cgi?id=445235 for details. if (do_cxx_demangling && VG_(clo_demangle) - && orig != NULL && orig[0] == '_' && orig[1] == 'Z') { + && orig != NULL && orig[0] == '_' && (orig[1] == 'Z' || orig[1] == 'R')) { /* !!! vvv STATIC vvv !!! */ static HChar* demangled = NULL; /* !!! ^^^ STATIC ^^^ !!! */ diff --git a/memcheck/tests/demangle-rust.c b/memcheck/tests/demangle-rust.c new file mode 100644 index 0000000000..f2a458b2ac --- /dev/null +++ b/memcheck/tests/demangle-rust.c @@ -0,0 +1,31 @@ +// Valgrind supports demangling Rust symbols (both the "v0" and "legacy" +// mangling schemes), but we don't want to add a dependency on the Rust +// compiler for a single test. So this is a C program with function names that +// are mangled Rust symbols. In the output, they become demangled Rust names. +// It's a hack, but a useful one. + +#include <stdlib.h> + +// A v0 symbol that demangles to: <rustc_middle::ty::PredicateKind as rustc_middle::ty::fold::TypeFoldable>::fold_with::<rustc_infer::infer::resolve::OpportunisticVarResolver> +int _RINvYNtNtCs4uGc65yWeeX_12rustc_middle2ty13PredicateKindNtNtB5_4fold12TypeFoldable9fold_withNtNtNtCsgI90OQiJWEs_11rustc_infer5infer7resolve24OpportunisticVarResolverECsdozMG8X9FIu_21rustc_trait_selection(int *p) +{ + return *p ? 1 : 2; +} + +// A v0 symbol that demangles to: rustc_expand::mbe::macro_parser::parse_tt +int _RNvNtNtCsaqSe1lZGvEL_12rustc_expand3mbe12macro_parser8parse_tt(int* p) +{ + return _RINvYNtNtCs4uGc65yWeeX_12rustc_middle2ty13PredicateKindNtNtB5_4fold12TypeFoldable9fold_withNtNtNtCsgI90OQiJWEs_11rustc_infer5infer7resolve24OpportunisticVarResolverECsdozMG8X9FIu_21rustc_trait_selection(p); +} + +// A legacy symbol that demangles to: core::str::lossy::Utf8Lossy::from_bytes +int _ZN4core3str5lossy9Utf8Lossy10from_bytes17heb1677c8cb728b0bE(int* p) +{ + return _RNvNtNtCsaqSe1lZGvEL_12rustc_expand3mbe12macro_parser8parse_tt(p); +} + +int main(void) +{ + return _ZN4core3str5lossy9Utf8Lossy10from_bytes17heb1677c8cb728b0bE(malloc(sizeof(int))); +} + diff --git a/memcheck/tests/demangle-rust.stderr.exp b/memcheck/tests/demangle-rust.stderr.exp new file mode 100644 index 0000000000..f04bb625b1 --- /dev/null +++ b/memcheck/tests/demangle-rust.stderr.exp @@ -0,0 +1,6 @@ +Conditional jump or move depends on uninitialised value(s) + at 0x........: <rustc_middle::ty::PredicateKind as rustc_middle::ty::fold::TypeFoldable>::fold_with::<rustc_infer::infer::resolve::OpportunisticVarResolver> (demangle-rust.c:12) + by 0x........: rustc_expand::mbe::macro_parser::parse_tt (demangle-rust.c:18) + by 0x........: core::str::lossy::Utf8Lossy::from_bytes (demangle-rust.c:24) + by 0x........: main (demangle-rust.c:29) + diff --git a/memcheck/tests/demangle-rust.vgtest b/memcheck/tests/demangle-rust.vgtest new file mode 100644 index 0000000000..d726c6b2e4 --- /dev/null +++ b/memcheck/tests/demangle-rust.vgtest @@ -0,0 +1,2 @@ +prog: demangle-rust +vgopts: -q |
|
From: Paul F. <pa...@so...> - 2021-11-09 22:22:19
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=d1d74d7985725a3fc5b8c536efa0cf1f491d34b0 commit d1d74d7985725a3fc5b8c536efa0cf1f491d34b0 Author: Paul Floyd <pj...@wa...> Date: Tue Nov 9 23:19:19 2021 +0100 Some FreeBSD cleaning Add a scalar expected for FreeBSD 13 i386 Add SIGLIBRT define Diff: --- include/vki/vki-freebsd.h | 5 +- .../tests/freebsd/scalar.stderr.exp-freebsd130-x86 | 5371 ++++++++++++++++++++ 2 files changed, 5374 insertions(+), 2 deletions(-) diff --git a/include/vki/vki-freebsd.h b/include/vki/vki-freebsd.h index a9ff6fb9d6..4cf7b5aebb 100644 --- a/include/vki/vki-freebsd.h +++ b/include/vki/vki-freebsd.h @@ -490,13 +490,14 @@ typedef __vki_signalfn_t *__vki_sighandler_t; #define VKI_SIGIO 23 #define VKI_SIGXCPU 24 #define VKI_SIGXFSZ 25 -#define VKI_SIGVTALRM 26 +#define VKI_SIGVTALRM 26 #define VKI_SIGPROF 27 -#define VKI_SIGWINCH 28 +#define VKI_SIGWINCH 28 #define VKI_SIGINFO 29 #define VKI_SIGUSR1 30 #define VKI_SIGUSR2 31 #define VKI_SIGTHR 32 +#define VKI_SIGLIBRT 33 #define VKI_SIGRTMIN 65 #define VKI_SIGRTMAX 126 diff --git a/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 new file mode 100644 index 0000000000..5770eb5f58 --- /dev/null +++ b/memcheck/tests/freebsd/scalar.stderr.exp-freebsd130-x86 @@ -0,0 +1,5371 @@ +--------------------------------------------------------- + 1: SYS_exit below +--------------------------------------------------------- +--------------------------------------------------------- + 2: SYS_fork other +--------------------------------------------------------- +--------------------------------------------------------- + 3: SYS_read 1+3s 0m +--------------------------------------------------------- +Syscall param (syscallno) contains uninitialised byte(s) + ... + +Syscall param read(buf) contains uninitialised byte(s) + ... + +Syscall param read(count) contains uninitialised byte(s) + ... + +Syscall param read(buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 4: SYS_write 3s 1m +--------------------------------------------------------- +Syscall param write(fd) contains uninitialised byte(s) + ... + +Syscall param write(buf) contains uninitialised byte(s) + ... + +Syscall param write(count) contains uninitialised byte(s) + ... + +Syscall param write(buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 5: SYS_open (2-args) 2s 1m +--------------------------------------------------------- +Syscall param open(filename) contains uninitialised byte(s) + ... + +Syscall param open(flags) contains uninitialised byte(s) + ... + +Syscall param open(filename) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 5: SYS_open (3-args) 1s 0m +--------------------------------------------------------- +Syscall param open(mode) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 6: SYS_close 1s 0m +--------------------------------------------------------- +Syscall param close(fd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 7: SYS_wait4 4s 2m +--------------------------------------------------------- +Syscall param wait4(pid) contains uninitialised byte(s) + ... + +Syscall param wait4(status) contains uninitialised byte(s) + ... + +Syscall param wait4(options) contains uninitialised byte(s) + ... + +Syscall param wait4(rusage) contains uninitialised byte(s) + ... + +Syscall param wait4(status) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param wait4(rusage) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 9: SYS_link 2s 2m +--------------------------------------------------------- +Syscall param link(oldpath) contains uninitialised byte(s) + ... + +Syscall param link(newpath) contains uninitialised byte(s) + ... + +Syscall param link(oldpath) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param link(newpath) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 10: SYS_unlink 1s 1m +--------------------------------------------------------- +Syscall param unlink(pathname) contains uninitialised byte(s) + ... + +Syscall param unlink(pathname) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 12: SYS_chdir 1s 1m +--------------------------------------------------------- +Syscall param chdir(path) contains uninitialised byte(s) + ... + +Syscall param chdir(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 13: SYS_fchdir 1s 0m +--------------------------------------------------------- +Syscall param fchdir(fd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 14: SYS_freebsd11_mknod 3s 1m +--------------------------------------------------------- +Syscall param mknod(pathname) contains uninitialised byte(s) + ... + +Syscall param mknod(mode) contains uninitialised byte(s) + ... + +Syscall param mknod(dev) contains uninitialised byte(s) + ... + +Syscall param mknod(pathname) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 15: SYS_chmod 2s 1m +--------------------------------------------------------- +Syscall param chmod(path) contains uninitialised byte(s) + ... + +Syscall param chmod(mode) contains uninitialised byte(s) + ... + +Syscall param chmod(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 16: SYS_chown 3s 1m +--------------------------------------------------------- +Syscall param chown(path) contains uninitialised byte(s) + ... + +Syscall param chown(owner) contains uninitialised byte(s) + ... + +Syscall param chown(group) contains uninitialised byte(s) + ... + +Syscall param chown(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 17: SYS_break 1s 1m +--------------------------------------------------------- +Syscall param brk(end_data_segment) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 20: SYS_getpid 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 21: SYS_mount 4s 2m +--------------------------------------------------------- +Syscall param mount(type) contains uninitialised byte(s) + ... + +Syscall param mount(dir) contains uninitialised byte(s) + ... + +Syscall param mount(flags) contains uninitialised byte(s) + ... + +Syscall param mount(data) contains uninitialised byte(s) + ... + +Syscall param mount(type) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param mount(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 22: SYS_unmount 2s 1m +--------------------------------------------------------- +Syscall param unmount(dir) contains uninitialised byte(s) + ... + +Syscall param unmount(flags) contains uninitialised byte(s) + ... + +Syscall param unmount(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 23: SYS_setuid 1s 0m +--------------------------------------------------------- +Syscall param setuid(uid) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 24: SYS_getuid 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 25: SYS_geteuid 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 26: SYS_ptrace 4s 0m +--------------------------------------------------------- +Syscall param ptrace(request) contains uninitialised byte(s) + ... + +Syscall param ptrace(pid) contains uninitialised byte(s) + ... + +Syscall param ptrace(addr) contains uninitialised byte(s) + ... + +Syscall param ptrace(data) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 27: SYS_recvmsg 3s 0m +--------------------------------------------------------- +Syscall param recvmsg(s) contains uninitialised byte(s) + ... + +Syscall param recvmsg(msg) contains uninitialised byte(s) + ... + +Syscall param recvmsg(flags) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 28: SYS_sendmsg 3s 0m +--------------------------------------------------------- +Syscall param sendmsg(s) contains uninitialised byte(s) + ... + +Syscall param sendmsg(msg) contains uninitialised byte(s) + ... + +Syscall param sendmsg(flags) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 29: SYS_recvfrom 6+1s 0m +--------------------------------------------------------- +Syscall param recvfrom(s) contains uninitialised byte(s) + ... + +Syscall param recvfrom(buf) contains uninitialised byte(s) + ... + +Syscall param recvfrom(len) contains uninitialised byte(s) + ... + +Syscall param recvfrom(flags) contains uninitialised byte(s) + ... + +Syscall param recvfrom(from) contains uninitialised byte(s) + ... + +Syscall param recvfrom(fromlen) contains uninitialised byte(s) + ... + +Syscall param socketcall.recvfrom(buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param socketcall.recvfrom(fromlen_in) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 30: SYS_accept 3+1s 0m +--------------------------------------------------------- +Syscall param accept(s) contains uninitialised byte(s) + ... + +Syscall param accept(addr) contains uninitialised byte(s) + ... + +Syscall param accept(*addrlen) contains uninitialised byte(s) + ... + +Syscall param socketcall.accept(addrlen_in) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 31: SYS_getpeername 3s 1m +--------------------------------------------------------- +Syscall param getpeername(s) contains uninitialised byte(s) + ... + +Syscall param getpeername(name) contains uninitialised byte(s) + ... + +Syscall param getpeername(namelen) contains uninitialised byte(s) + ... + +Syscall param socketcall.getpeername(namelen_in) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 32: SYS_getsockname 3s 1m +--------------------------------------------------------- +Syscall param getsockname(s) contains uninitialised byte(s) + ... + +Syscall param getsockname(name) contains uninitialised byte(s) + ... + +Syscall param getsockname(namelen) contains uninitialised byte(s) + ... + +Syscall param socketcall.getsockname(namelen_in) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 25: SYS_geteuid 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 34: SYS_chflags 2s 1m +--------------------------------------------------------- +Syscall param chflags(path) contains uninitialised byte(s) + ... + +Syscall param chflags(flags) contains uninitialised byte(s) + ... + +Syscall param chflags(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 35: SYS_fchflags 2s 0m +--------------------------------------------------------- +Syscall param fchflags(fd) contains uninitialised byte(s) + ... + +Syscall param fchflags(flags) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 36: SYS_sync 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 37: SYS_kill 2s 0m +--------------------------------------------------------- +Syscall param kill(pid) contains uninitialised byte(s) + ... + +Syscall param kill(signal) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 39: SYS_getppid 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 41: SYS_dup 1s 0m +--------------------------------------------------------- +Syscall param dup(oldfd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 42: SYS_freebsd10_pipe 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 43: SYS_getegid 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 44: SYS_profil ni +--------------------------------------------------------- +--------------------------------------------------------- + 45: SYS_ktrace ni +--------------------------------------------------------- +--------------------------------------------------------- + 47: SYS_getgid 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 49: SYS_getlogin 2s 1m +--------------------------------------------------------- +Syscall param getlogin(buf) contains uninitialised byte(s) + ... + +Syscall param getlogin(len) contains uninitialised byte(s) + ... + +Syscall param getlogin(name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 50: SYS_setlogin 1s 1m +--------------------------------------------------------- +Syscall param setlogin(buf) contains uninitialised byte(s) + ... + +Syscall param setlogin(buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 51: SYS_acct 1s 1m +--------------------------------------------------------- +Syscall param acct(filename) contains uninitialised byte(s) + ... + +Syscall param acct(filename) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 53: SYS_sigaltstack 2s 2m +--------------------------------------------------------- +Syscall param sigaltstack(ss) contains uninitialised byte(s) + ... + +Syscall param sigaltstack(oss) contains uninitialised byte(s) + ... + +Syscall param sigaltstack(ss) points to unaddressable byte(s) + ... + Address 0x........ is on thread 1's stack + +Syscall param sigaltstack(oss) points to unaddressable byte(s) + ... + Address 0x........ is on thread 1's stack + +Conditional jump or move depends on uninitialised value(s) + ... + +--------------------------------------------------------- + 54: SYS_ioctl 3s 1m +--------------------------------------------------------- + +More than 100 errors detected. Subsequent errors +will still be recorded, but in less detail than before. +Syscall param ioctl(fd) contains uninitialised byte(s) + ... + +Syscall param ioctl(request) contains uninitialised byte(s) + ... + +Syscall param ioctl(arg) contains uninitialised byte(s) + ... + +Syscall param ioctl(generic) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 56: SYS_revoke 1s 1m +--------------------------------------------------------- +Syscall param revoke(path) contains uninitialised byte(s) + ... + +Syscall param revoke(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 57: SYS_symlink 2s 2m +--------------------------------------------------------- +Syscall param symlink(oldpath) contains uninitialised byte(s) + ... + +Syscall param symlink(newpath) contains uninitialised byte(s) + ... + +Syscall param symlink(oldpath) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param symlink(newpath) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 58: SYS_readlink 3s 2m +--------------------------------------------------------- +Syscall param readlink(path) contains uninitialised byte(s) + ... + +Syscall param readlink(buf) contains uninitialised byte(s) + ... + +Syscall param readlink(bufsiz) contains uninitialised byte(s) + ... + +Syscall param readlink(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param readlink(buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 59: SYS_execve 3s 1m +--------------------------------------------------------- +Syscall param execve(filename) contains uninitialised byte(s) + ... + +Syscall param execve(argv) contains uninitialised byte(s) + ... + +Syscall param execve(envp) contains uninitialised byte(s) + ... + +Syscall param execve(filename) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 60: SYS_umask 1s 0m +--------------------------------------------------------- +Syscall param umask(mask) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 61: SYS_chroot 1s 1m +--------------------------------------------------------- +Syscall param chroot(path) contains uninitialised byte(s) + ... + +Syscall param chroot(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 65: SYS_msync 3s 1m +--------------------------------------------------------- +Syscall param msync(start) contains uninitialised byte(s) + ... + +Syscall param msync(length) contains uninitialised byte(s) + ... + +Syscall param msync(flags) contains uninitialised byte(s) + ... + +Syscall param msync(start) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 66: SYS_vfork other +--------------------------------------------------------- +--------------------------------------------------------- + 69: SYS_sbrk 1s 1m +--------------------------------------------------------- +Syscall param sbrk(incr) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 73: SYS_munmap 2s 0m +--------------------------------------------------------- +Syscall param munmap(start) contains uninitialised byte(s) + ... + +Syscall param munmap(length) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 74: SYS_mprotect 3s 0m +--------------------------------------------------------- +Syscall param mprotect(addr) contains uninitialised byte(s) + ... + +Syscall param mprotect(len) contains uninitialised byte(s) + ... + +Syscall param mprotect(prot) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 75: SYS_madvise 3s 0m +--------------------------------------------------------- +Syscall param madvise(start) contains uninitialised byte(s) + ... + +Syscall param madvise(length) contains uninitialised byte(s) + ... + +Syscall param madvise(advice) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 78: SYS_mincore 3s 1m +--------------------------------------------------------- +Syscall param mincore(start) contains uninitialised byte(s) + ... + +Syscall param mincore(length) contains uninitialised byte(s) + ... + +Syscall param mincore(vec) contains uninitialised byte(s) + ... + +Syscall param mincore(vec) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 79: SYS_getgroups 2s 1m +--------------------------------------------------------- +Syscall param getgroups(size) contains uninitialised byte(s) + ... + +Syscall param getgroups(list) contains uninitialised byte(s) + ... + +Syscall param getgroups(list) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 80: SYS_setgroups 2s 1m +--------------------------------------------------------- +Syscall param setgroups(size) contains uninitialised byte(s) + ... + +Syscall param setgroups(list) contains uninitialised byte(s) + ... + +Syscall param setgroups(list) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 81: SYS_getpgrp 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 82: SYS_setpgid 2s 0m +--------------------------------------------------------- +Syscall param setpgid(pid) contains uninitialised byte(s) + ... + +Syscall param setpgid(pgid) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 83: SYS_setitimer 3s 2m +--------------------------------------------------------- +Syscall param setitimer(which) contains uninitialised byte(s) + ... + +Syscall param setitimer(value) contains uninitialised byte(s) + ... + +Syscall param setitimer(ovalue) contains uninitialised byte(s) + ... + +Syscall param setitimer(&value->it_interval) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param setitimer(&value->it_value) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param setitimer(&ovalue->it_interval) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param setitimer(&ovalue->it_value) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 85: SYS_swapon 1s 1m +--------------------------------------------------------- +Syscall param swapon(special) contains uninitialised byte(s) + ... + +Syscall param swapon(special) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 86: SYS_getitimer 2s 1m +--------------------------------------------------------- +Syscall param getitimer(which) contains uninitialised byte(s) + ... + +Syscall param getitimer(value) contains uninitialised byte(s) + ... + +Syscall param getitimer(&value->it_interval) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getitimer(&value->it_value) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 89: SYS_getdtablesize 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- + 90: SYS_dup2 2s 0m +--------------------------------------------------------- +Syscall param dup2(oldfd) contains uninitialised byte(s) + ... + +Syscall param dup2(newfd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 92: SYS_fcntl (GETFD) 2s 0m +--------------------------------------------------------- +Syscall param fcntl(fd) contains uninitialised byte(s) + ... + +Syscall param fcntl(cmd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 92: SYS_fcntl (DUPFD) 1s 0m +--------------------------------------------------------- +Syscall param fcntl(arg) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 93: SYS_select 5s 4m +--------------------------------------------------------- +Syscall param select(n) contains uninitialised byte(s) + ... + +Syscall param select(readfds) contains uninitialised byte(s) + ... + +Syscall param select(writefds) contains uninitialised byte(s) + ... + +Syscall param select(exceptfds) contains uninitialised byte(s) + ... + +Syscall param select(timeout) contains uninitialised byte(s) + ... + +Syscall param select(readfds) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param select(writefds) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param select(exceptfds) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param select(timeout) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- + 95: SYS_fsync 1s 0m +--------------------------------------------------------- +Syscall param fsync(fd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 96: SYS_setpriority 3s 0m +--------------------------------------------------------- +Syscall param setpriority(which) contains uninitialised byte(s) + ... + +Syscall param setpriority(who) contains uninitialised byte(s) + ... + +Syscall param setpriority(prio) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 97: SYS_socket 3s 0m +--------------------------------------------------------- +Syscall param socket(domain) contains uninitialised byte(s) + ... + +Syscall param socket(type) contains uninitialised byte(s) + ... + +Syscall param socket(protocol) contains uninitialised byte(s) + ... + +--------------------------------------------------------- + 98: SYS_connect 3s 0m +--------------------------------------------------------- +Syscall param connect(s) contains uninitialised byte(s) + ... + +Syscall param connect(name) contains uninitialised byte(s) + ... + +Syscall param connect(namelen) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +100: SYS_getpriority 2s 0m +--------------------------------------------------------- +Syscall param getpriority(which) contains uninitialised byte(s) + ... + +Syscall param getpriority(who) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +104: SYS_bind 3s 0m +--------------------------------------------------------- +Syscall param bind(s) contains uninitialised byte(s) + ... + +Syscall param bind(addr) contains uninitialised byte(s) + ... + +Syscall param bind(addrlen) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +105: SYS_setsockopt 5s 0m +--------------------------------------------------------- +Syscall param setsockopt(s) contains uninitialised byte(s) + ... + +Syscall param setsockopt(level) contains uninitialised byte(s) + ... + +Syscall param setsockopt(optname) contains uninitialised byte(s) + ... + +Syscall param setsockopt(optval) contains uninitialised byte(s) + ... + +Syscall param setsockopt(optlen) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +106: SYS_listen 2s 0m +--------------------------------------------------------- +Syscall param listen(s) contains uninitialised byte(s) + ... + +Syscall param listen(backlog) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +116: SYS_gettimeofday 2s 2m +--------------------------------------------------------- +Syscall param gettimeofday(tv) contains uninitialised byte(s) + ... + +Syscall param gettimeofday(tz) contains uninitialised byte(s) + ... + +Syscall param gettimeofday(tv) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param gettimeofday(tz) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +117: SYS_getrusage 2s 1m +--------------------------------------------------------- +Syscall param getrusage(who) contains uninitialised byte(s) + ... + +Syscall param getrusage(usage) contains uninitialised byte(s) + ... + +Syscall param getrusage(usage) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +105: SYS_setsockopt 5s 1m +--------------------------------------------------------- +Syscall param setsockopt(s) contains uninitialised byte(s) + ... + +Syscall param setsockopt(level) contains uninitialised byte(s) + ... + +Syscall param setsockopt(optname) contains uninitialised byte(s) + ... + +Syscall param setsockopt(optval) contains uninitialised byte(s) + ... + +Syscall param setsockopt(optlen) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +120: SYS_readv 3s 1m +--------------------------------------------------------- +Syscall param readv(fd) contains uninitialised byte(s) + ... + +Syscall param readv(vector) contains uninitialised byte(s) + ... + +Syscall param readv(count) contains uninitialised byte(s) + ... + +Syscall param readv(vector) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +121: SYS_writev 3s 1m +--------------------------------------------------------- +Syscall param writev(fd) contains uninitialised byte(s) + ... + +Syscall param writev(vector) contains uninitialised byte(s) + ... + +Syscall param writev(count) contains uninitialised byte(s) + ... + +Syscall param writev(vector) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +122: SYS_settimeofday 2s 2m +--------------------------------------------------------- +Syscall param settimeofday(tv) contains uninitialised byte(s) + ... + +Syscall param settimeofday(tz) contains uninitialised byte(s) + ... + +Syscall param settimeofday(tv) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param settimeofday(tz) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +123: SYS_fchown 3s 0m +--------------------------------------------------------- +Syscall param fchown(fd) contains uninitialised byte(s) + ... + +Syscall param fchown(owner) contains uninitialised byte(s) + ... + +Syscall param fchown(group) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +124: SYS_fchmod 2s 0m +--------------------------------------------------------- +Syscall param fchmod(fildes) contains uninitialised byte(s) + ... + +Syscall param fchmod(mode) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +126: SYS_setreuid 2s 0m +--------------------------------------------------------- +Syscall param setreuid(ruid) contains uninitialised byte(s) + ... + +Syscall param setreuid(euid) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +127: SYS_setregid 2s 0m +--------------------------------------------------------- +Syscall param setregid(rgid) contains uninitialised byte(s) + ... + +Syscall param setregid(egid) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +128: SYS_rename 2s 2m +--------------------------------------------------------- +Syscall param rename(oldpath) contains uninitialised byte(s) + ... + +Syscall param rename(newpath) contains uninitialised byte(s) + ... + +Syscall param rename(oldpath) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param rename(newpath) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +131: SYS_flock 2s 0m +--------------------------------------------------------- +Syscall param flock(fd) contains uninitialised byte(s) + ... + +Syscall param flock(operation) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +132: SYS_mkfifo 2s 1m +--------------------------------------------------------- +Syscall param mkfifo(path) contains uninitialised byte(s) + ... + +Syscall param mkfifo(mode) contains uninitialised byte(s) + ... + +Syscall param mkfifo(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +133: SYS_sendto 6s 0m +--------------------------------------------------------- +Syscall param sendto(s) contains uninitialised byte(s) + ... + +Syscall param sendto(msg) contains uninitialised byte(s) + ... + +Syscall param sendto(len) contains uninitialised byte(s) + ... + +Syscall param sendto(flags) contains uninitialised byte(s) + ... + +Syscall param sendto(to) contains uninitialised byte(s) + ... + +Syscall param sendto(tolen) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +135: SYS_socketpair 4s 1m +--------------------------------------------------------- +Syscall param socketpair(domain) contains uninitialised byte(s) + ... + +Syscall param socketpair(type) contains uninitialised byte(s) + ... + +Syscall param socketpair(protocol) contains uninitialised byte(s) + ... + +Syscall param socketpair(sv) contains uninitialised byte(s) + ... + +Syscall param socketcall.socketpair(sv) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +136: SYS_mkdir 2s 1m +--------------------------------------------------------- +Syscall param mkdir(pathname) contains uninitialised byte(s) + ... + +Syscall param mkdir(mode) contains uninitialised byte(s) + ... + +Syscall param mkdir(pathname) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +137: SYS_rmdir 1s 1m +--------------------------------------------------------- +Syscall param rmdir(pathname) contains uninitialised byte(s) + ... + +Syscall param rmdir(pathname) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +138: SYS_utimes 2s 2m +--------------------------------------------------------- +Syscall param utimes(filename) contains uninitialised byte(s) + ... + +Syscall param utimes(tvp) contains uninitialised byte(s) + ... + +Syscall param utimes(filename) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param utimes(tvp[0]) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param utimes(tvp[1]) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +140: SYS_adjtime 2s 1m +--------------------------------------------------------- +Syscall param adjtime(delta) contains uninitialised byte(s) + ... + +Syscall param adjtime(olddelta) contains uninitialised byte(s) + ... + +Syscall param adjtime(delta) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +147: SYS_setsid 0s 0m +--------------------------------------------------------- +--------------------------------------------------------- +148: SYS_quotactl (Q_QUOTAOFF) 2s 0m +--------------------------------------------------------- +Syscall param quotactl(path) contains uninitialised byte(s) + ... + +Syscall param quotactl(cmd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +148: SYS_quotactl (Q_QUOTAON) 4s 2m +--------------------------------------------------------- +Syscall param quotactl(path) contains uninitialised byte(s) + ... + +Syscall param quotactl(cmd) contains uninitialised byte(s) + ... + +Syscall param quotactl(id) contains uninitialised byte(s) + ... + +Syscall param quotactl(addr) contains uninitialised byte(s) + ... + +Syscall param quotactl(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +160: SYS_lgetfh 2s 2m +--------------------------------------------------------- +Syscall param lgetfh(path) contains uninitialised byte(s) + ... + +Syscall param lgetfh(fhp) contains uninitialised byte(s) + ... + +Syscall param lgetfh(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lgetfh(fhp) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +161: SYS_getfh 2s 2m +--------------------------------------------------------- +Syscall param getfh(path) contains uninitialised byte(s) + ... + +Syscall param getfh(fhp) contains uninitialised byte(s) + ... + +Syscall param getfh(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getfh(fhp) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +165: SYS_sysarch 2s 1m +--------------------------------------------------------- +Syscall param sysarch(number) contains uninitialised byte(s) + ... + +Syscall param sysarch(args) contains uninitialised byte(s) + ... + +Syscall param i386_get_gsbase(basep) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +165: SYS_sysarch 2s 0m +--------------------------------------------------------- +Syscall param sysarch(number) contains uninitialised byte(s) + ... + +Syscall param sysarch(args) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +166: SYS_rtprio (GET) 3s 1m +--------------------------------------------------------- +Syscall param rtprio(function) contains uninitialised byte(s) + ... + +Syscall param rtprio(pid) contains uninitialised byte(s) + ... + +Syscall param rtprio(rtp) contains uninitialised byte(s) + ... + +Syscall param rtprio(rtp#lookup) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +166: SYS_rtprio (SET) 3s 1m +--------------------------------------------------------- +Syscall param rtprio(function) contains uninitialised byte(s) + ... + +Syscall param rtprio(pid) contains uninitialised byte(s) + ... + +Syscall param rtprio(rtp) contains uninitialised byte(s) + ... + +Syscall param rtprio(rtp#set) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +175: SYS_setfib 1s 0m +--------------------------------------------------------- +Syscall param setfib(fib) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +181: SYS_setgid 1s 0m +--------------------------------------------------------- +Syscall param setgid(gid) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +182: SYS_setegid 1s 0m +--------------------------------------------------------- +Syscall param setegid(gid) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +183: SYS_seteuid 1s 0m +--------------------------------------------------------- +Syscall param seteuid(uid) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +188: SYS_freebsd11_stat 2s 2m +--------------------------------------------------------- +Syscall param stat(path) contains uninitialised byte(s) + ... + +Syscall param stat(sb) contains uninitialised byte(s) + ... + +Syscall param stat(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param stat(sb) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +189: SYS_freebsd11_fstat 2s 1m +--------------------------------------------------------- +Syscall param fstat(fd) contains uninitialised byte(s) + ... + +Syscall param fstat(sb) contains uninitialised byte(s) + ... + +Syscall param fstat(sb) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +190: SYS_freebsd11_lstat 2s 2m +--------------------------------------------------------- +Syscall param lstat(path) contains uninitialised byte(s) + ... + +Syscall param lstat(sb) contains uninitialised byte(s) + ... + +Syscall param lstat(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param lstat(sb) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +191: SYS_pathconf 2s 1m +--------------------------------------------------------- +Syscall param pathconf(path) contains uninitialised byte(s) + ... + +Syscall param pathconf(name) contains uninitialised byte(s) + ... + +Syscall param pathconf(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +192: SYS_fpathconf 2s 0m +--------------------------------------------------------- +Syscall param fpathconf(fd) contains uninitialised byte(s) + ... + +Syscall param fpathconf(name) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +194: SYS_getrlimit 2s 1m +--------------------------------------------------------- +Syscall param getrlimit(resource) contains uninitialised byte(s) + ... + +Syscall param getrlimit(rlim) contains uninitialised byte(s) + ... + +Syscall param getrlimit(rlim) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +195: SYS_setrlimit 2s 1m +--------------------------------------------------------- +Syscall param setrlimit(resource) contains uninitialised byte(s) + ... + +Syscall param setrlimit(rlim) contains uninitialised byte(s) + ... + +Syscall param setrlimit(rlim) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +196:SYS_freebsd11_getdirentries 4s 2m +--------------------------------------------------------- +Syscall param getdirentries(fd) contains uninitialised byte(s) + ... + +Syscall param getdirentries(buf) contains uninitialised byte(s) + ... + +Syscall param getdirentries(nbytes) contains uninitialised byte(s) + ... + +Syscall param getdirentries(basep) contains uninitialised byte(s) + ... + +Syscall param getdirentries(buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param getdirentries(basep) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +202: SYS___sysctl (getoldlen) 3s 2m +--------------------------------------------------------- +Syscall param __sysctl(name) contains uninitialised byte(s) + ... + +Syscall param __sysctl(namelen) contains uninitialised byte(s) + ... + +Syscall param __sysctl(oldlenp) contains uninitialised byte(s) + ... + +Syscall param __sysctl(newlen) contains uninitialised byte(s) + ... + +Syscall param sysctl(name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param sysctl(oldlenp) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +202: SYS___sysctl (getold) 4s 2m +--------------------------------------------------------- +Syscall param __sysctl(name) contains uninitialised byte(s) + ... + +Syscall param __sysctl(namelen) contains uninitialised byte(s) + ... + +Syscall param __sysctl(oldp) contains uninitialised byte(s) + ... + +Syscall param __sysctl(oldlenp) contains uninitialised byte(s) + ... + +Syscall param __sysctl(newlen) contains uninitialised byte(s) + ... + +Syscall param sysctl(name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param sysctl(oldlenp) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Warning: Bad oldlenp address 0x........ in sysctl +--------------------------------------------------------- +202: SYS___sysctl (putnew) 4s 2m +--------------------------------------------------------- +Syscall param __sysctl(name) contains uninitialised byte(s) + ... + +Syscall param __sysctl(namelen) contains uninitialised byte(s) + ... + +Syscall param __sysctl(newp) contains uninitialised byte(s) + ... + +Syscall param __sysctl(newlen) contains uninitialised byte(s) + ... + +Syscall param sysctl(name) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param sysctl(newp) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +203: SYS_mlock 2s 0m +--------------------------------------------------------- +Syscall param mlock(addr) contains uninitialised byte(s) + ... + +Syscall param mlock(len) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +204: SYS_munlock 2s 0m +--------------------------------------------------------- +Syscall param munlock(addr) contains uninitialised byte(s) + ... + +Syscall param munlock(len) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +205: SYS_undelete 1s 1m +--------------------------------------------------------- +Syscall param undelete(path) contains uninitialised byte(s) + ... + +Syscall param undelete(path) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +206: SYS_futimes 2s 0m +--------------------------------------------------------- +Syscall param futimes(fd) contains uninitialised byte(s) + ... + +Syscall param futimes(times) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +207: SYS_getpgid 1s 0m +--------------------------------------------------------- +Syscall param getpgid(pid) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +209: SYS_poll 3s 3m +--------------------------------------------------------- +Syscall param poll(ufds) contains uninitialised byte(s) + ... + +Syscall param poll(nfds) contains uninitialised byte(s) + ... + +Syscall param poll(timeout) contains uninitialised byte(s) + ... + +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 + +--------------------------------------------------------- +220: SYS_freebsd7___semctl (IPC_INFO) 4s 1m +--------------------------------------------------------- +Syscall param semctl(semid) contains uninitialised byte(s) + ... + +Syscall param semctl(semnum) contains uninitialised byte(s) + ... + +Syscall param semctl(cmd) contains uninitialised byte(s) + ... + +Syscall param semctl(arg) contains uninitialised byte(s) + ... + +Syscall param semctl(IPC_INFO, arg.buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +220: SYS_freebsd7___semctl (bogus cmd) 3s 0m +--------------------------------------------------------- +Syscall param semctl(semid) contains uninitialised byte(s) + ... + +Syscall param semctl(semnum) contains uninitialised byte(s) + ... + +Syscall param semctl(cmd) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +221: SYS_semget 3s 0m +--------------------------------------------------------- +Syscall param semget(key) contains uninitialised byte(s) + ... + +Syscall param semget(nsems) contains uninitialised byte(s) + ... + +Syscall param semget(flag) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +222: SYS_semop 3s 0m +--------------------------------------------------------- +Syscall param semop(semid) contains uninitialised byte(s) + ... + +Syscall param semop(array) contains uninitialised byte(s) + ... + +Syscall param semop(nops) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +224: SYS_freebsd7_msgctl (set) 3s 1m +--------------------------------------------------------- +Syscall param msgctl(msqid) contains uninitialised byte(s) + ... + +Syscall param msgctl(cmd) contains uninitialised byte(s) + ... + +Syscall param msgctl(buf) contains uninitialised byte(s) + ... + +Syscall param msgctl(IPC_SET, buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +224: SYS_freebsd7_msgctl (stat) 3s 1m +--------------------------------------------------------- +Syscall param msgctl(msqid) contains uninitialised byte(s) + ... + +Syscall param msgctl(cmd) contains uninitialised byte(s) + ... + +Syscall param msgctl(buf) contains uninitialised byte(s) + ... + +Syscall param msgctl(IPC_STAT, buf) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +225: SYS_msgget 2s 0m +--------------------------------------------------------- +Syscall param msgget(key) contains uninitialised byte(s) + ... + +Syscall param msgget(msgflg) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +226: SYS_msgsnd 4s 1m +--------------------------------------------------------- +Syscall param msgsnd(msqid) contains uninitialised byte(s) + ... + +Syscall param msgsnd(msgp) contains uninitialised byte(s) + ... + +Syscall param msgsnd(msgsz) contains uninitialised byte(s) + ... + +Syscall param msgsnd(msgflg) contains uninitialised byte(s) + ... + +Syscall param msgsnd(msgp->mtype) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +227: SYS_msgrcv 4+1s 1m +--------------------------------------------------------- +Syscall param msgrcv(msqid) contains uninitialised byte(s) + ... + +Syscall param msgrcv(msgp) contains uninitialised byte(s) + ... + +Syscall param msgrcv(msgsz) contains uninitialised byte(s) + ... + +Syscall param msgrcv(msgtyp) contains uninitialised byte(s) + ... + +Syscall param msgrcv(msgflg) contains uninitialised byte(s) + ... + +Syscall param msgrcv(msgp->mtype) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +Syscall param msgrcv(msgp->mtext) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +228: SYS_shmat 3s 0m +--------------------------------------------------------- +Syscall param shmat(shmid) contains uninitialised byte(s) + ... + +Syscall param shmat(addr) contains uninitialised byte(s) + ... + +Syscall param shmat(flag) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +229: SYS_freebsd7_shmctl 3s 0m +--------------------------------------------------------- +Syscall param shmctl(shmid) contains uninitialised byte(s) + ... + +Syscall param shmctl(cmd) contains uninitialised byte(s) + ... + +Syscall param shmctl(buf) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +229: SYS_freebsd7_shmctl (bogus cmd) 3s 0m +--------------------------------------------------------- +Syscall param shmctl(shmid) contains uninitialised byte(s) + ... + +Syscall param shmctl(cmd) contains uninitialised byte(s) + ... + +Syscall param shmctl(buf) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +230: SYS_shmdt 1s 0m +--------------------------------------------------------- +Syscall param shmdt(addr) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +231: SYS_shmget 3s 0m +--------------------------------------------------------- +Syscall param shmget(key) contains uninitialised byte(s) + ... + +Syscall param shmget(size) contains uninitialised byte(s) + ... + +Syscall param shmget(flag) contains uninitialised byte(s) + ... + +--------------------------------------------------------- +232: SYS_clock_gettime 2s 1m +--------------------------------------------------------- +Syscall param clock_gettime(clk_id) contains uninitialised byte(s) + ... + +Syscall param clock_gettime(tp) contains uninitialised byte(s) + ... + +Syscall param clock_gettime(tp) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +233: SYS_clock_settime 2s 1m +--------------------------------------------------------- +Syscall param clock_settime(clk_id) contains uninitialised byte(s) + ... + +Syscall param clock_settime(tp) contains uninitialised byte(s) + ... + +Syscall param clock_settime(tp) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +234: SYS_clock_getres 2s 1m +--------------------------------------------------------- +Syscall param clock_getres(clock_id) contains uninitialised byte(s) + ... + +Syscall param clock_getres(tp) contains uninitialised byte(s) + ... + +Syscall param clock_getres(tp) points to unaddressable byte(s) + ... + Address 0x........ is not stack'd, malloc'd or (recently) free'd + +--------------------------------------------------------- +235: SYS_ktimer_create 3s 2m +--------------------------------------------------------- +Syscall param timer_create(clockid) contains uninitialised byte(s) + ... + +Syscall ... [truncated message content] |