View | Details | Raw Unified | Return to bug 234045
Collapse All | Expand All

(-)devel/valgrind/Makefile (-1 / +2 lines)
Lines 51-57 Link Here
51
		${FILESDIR}/accept4_syscall.patch:-p1 \
51
		${FILESDIR}/accept4_syscall.patch:-p1 \
52
		${FILESDIR}/jail_syscalls.patch:-p1 \
52
		${FILESDIR}/jail_syscalls.patch:-p1 \
53
		${FILESDIR}/kldload_syscalls.patch:-p1 \
53
		${FILESDIR}/kldload_syscalls.patch:-p1 \
54
		${FILESDIR}/missing_fcntls.patch:-p1
54
		${FILESDIR}/missing_fcntls.patch:-p1 \
55
		${FILESDIR}/sigwait.patch:-p1
55
56
56
PORTDOCS=	html
57
PORTDOCS=	html
57
58
(-)devel/valgrind/files/sigwait.patch (+46 lines)
Line 0 Link Here
1
--- a/coregrind/m_syswrap/syswrap-freebsd.c	2018-12-12 19:09:24.180201000 +0300
2
+++ b/coregrind/m_syswrap/syswrap-freebsd.c	2018-12-13 15:13:53.279566000 +0300
3
@@ -2537,6 +2537,24 @@
4
       POST_MEM_WRITE( ARG2, sizeof(vki_siginfo_t) );
5
 }
6
 
7
+PRE(sys_sigwait)
8
+{
9
+   *flags |= SfMayBlock;
10
+   PRINT("sys_sigwait ( %#lx, %#lx )",
11
+         ARG1,ARG2);
12
+   PRE_REG_READ2(long, "sigwait", 
13
+                 const vki_sigset_t *, set, int *, sig);
14
+   if (ARG1 != 0) 
15
+      PRE_MEM_READ(  "sigwait(set)",  ARG1, sizeof(vki_sigset_t));
16
+   if (ARG2 != 0)
17
+      PRE_MEM_WRITE( "sigwait(sig)", ARG2, sizeof(int*));
18
+}
19
+POST(sys_sigwait)
20
+{
21
+   if (ARG2 != 0)
22
+      POST_MEM_WRITE( ARG2, sizeof(int*));
23
+}
24
+
25
 #if 0	/* not on freebsd 4.x */
26
 PRE(sys_rt_sigqueueinfo)
27
 {
28
@@ -4309,7 +4340,7 @@
29
    BSDX_(__NR___acl_delete_link,	sys___acl_delete_link),		// 427
30
 
31
    BSDX_(__NR___acl_aclcheck_link,	sys___acl_aclcheck_link),	// 428
32
-   //!sigwait								   429
33
+   BSDXY(__NR_sigwait,			sys_sigwait),			// 429
34
    // thr_create							   430
35
    BSDX_(__NR_thr_exit,			sys_thr_exit),			// 431
36
 
37
--- a/coregrind/m_syswrap/priv_syswrap-freebsd.h	2018-12-13 15:16:09.551822000 +0300
38
+++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h	2018-12-13 15:16:16.487873000 +0300
39
@@ -181,6 +181,7 @@
40
 DECL_TEMPLATE(freebsd, sys_fake_sigreturn);
41
 DECL_TEMPLATE(freebsd, sys_sigtimedwait);
42
 DECL_TEMPLATE(freebsd, sys_sigwaitinfo);
43
+DECL_TEMPLATE(freebsd, sys_sigwait);
44
 DECL_TEMPLATE(freebsd, sys_getcontext);
45
 DECL_TEMPLATE(freebsd, sys_setcontext);
46
 DECL_TEMPLATE(freebsd, sys_swapcontext);
(-)devel/valgrind-devel/Makefile (-1 / +2 lines)
Lines 52-58 Link Here
52
		${FILESDIR}/accept4_syscall.patch:-p1 \
52
		${FILESDIR}/accept4_syscall.patch:-p1 \
53
		${FILESDIR}/jail_syscalls.patch:-p1 \
53
		${FILESDIR}/jail_syscalls.patch:-p1 \
54
		${FILESDIR}/kldload_syscalls.patch:-p1 \
54
		${FILESDIR}/kldload_syscalls.patch:-p1 \
55
		${FILESDIR}/missing_fcntls.patch:-p1
55
		${FILESDIR}/missing_fcntls.patch:-p1 \
56
		${FILESDIR}/sigwait.patch:-p1
56
57
57
PORTDOCS=	html
58
PORTDOCS=	html
58
59
(-)devel/valgrind-devel/files/sigwait.patch (+46 lines)
Line 0 Link Here
1
--- a/coregrind/m_syswrap/syswrap-freebsd.c	2018-12-12 19:09:24.180201000 +0300
2
+++ b/coregrind/m_syswrap/syswrap-freebsd.c	2018-12-13 15:13:53.279566000 +0300
3
@@ -2537,6 +2537,24 @@
4
       POST_MEM_WRITE( ARG2, sizeof(vki_siginfo_t) );
5
 }
6
 
7
+PRE(sys_sigwait)
8
+{
9
+   *flags |= SfMayBlock;
10
+   PRINT("sys_sigwait ( %#lx, %#lx )",
11
+         ARG1,ARG2);
12
+   PRE_REG_READ2(long, "sigwait", 
13
+                 const vki_sigset_t *, set, int *, sig);
14
+   if (ARG1 != 0) 
15
+      PRE_MEM_READ(  "sigwait(set)",  ARG1, sizeof(vki_sigset_t));
16
+   if (ARG2 != 0)
17
+      PRE_MEM_WRITE( "sigwait(sig)", ARG2, sizeof(int*));
18
+}
19
+POST(sys_sigwait)
20
+{
21
+   if (ARG2 != 0)
22
+      POST_MEM_WRITE( ARG2, sizeof(int*));
23
+}
24
+
25
 #if 0	/* not on freebsd 4.x */
26
 PRE(sys_rt_sigqueueinfo)
27
 {
28
@@ -4309,7 +4340,7 @@
29
    BSDX_(__NR___acl_delete_link,	sys___acl_delete_link),		// 427
30
 
31
    BSDX_(__NR___acl_aclcheck_link,	sys___acl_aclcheck_link),	// 428
32
-   //!sigwait								   429
33
+   BSDXY(__NR_sigwait,			sys_sigwait),			// 429
34
    // thr_create							   430
35
    BSDX_(__NR_thr_exit,			sys_thr_exit),			// 431
36
 
37
--- a/coregrind/m_syswrap/priv_syswrap-freebsd.h	2018-12-13 15:16:09.551822000 +0300
38
+++ b/coregrind/m_syswrap/priv_syswrap-freebsd.h	2018-12-13 15:16:16.487873000 +0300
39
@@ -181,6 +181,7 @@
40
 DECL_TEMPLATE(freebsd, sys_fake_sigreturn);
41
 DECL_TEMPLATE(freebsd, sys_sigtimedwait);
42
 DECL_TEMPLATE(freebsd, sys_sigwaitinfo);
43
+DECL_TEMPLATE(freebsd, sys_sigwait);
44
 DECL_TEMPLATE(freebsd, sys_getcontext);
45
 DECL_TEMPLATE(freebsd, sys_setcontext);
46
 DECL_TEMPLATE(freebsd, sys_swapcontext);

Return to bug 234045