Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
David Goulet
Tor
Commits
4f9a0033
Unverified
Commit
4f9a0033
authored
Nov 06, 2019
by
teor
Browse files
Merge remote-tracking branch 'tor-github/pr/1374' into maint-0.4.1
parents
63aff4a4
9b73088c
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/bug31897
0 → 100644
View file @
4f9a0033
o Minor bugfixes (tests, SunOS):
- Avoid a map_anon_nofork test failure due to a signed/unsigned integer
comparison. Fixes bug 31897; bugfix on 0.4.1.1-alpha.
src/test/test_util.c
View file @
4f9a0033
...
...
@@ -6182,6 +6182,7 @@ test_util_map_anon_nofork(void *arg)
* crash, or send zero. */
char
*
ptr
=
NULL
;
const
char
TEST_VALUE
=
0xd0
;
size_t
sz
=
16384
;
int
pipefd
[
2
]
=
{
-
1
,
-
1
};
unsigned
inherit
=
0
;
...
...
@@ -6189,7 +6190,7 @@ test_util_map_anon_nofork(void *arg)
tor_munmap_anonymous
(
ptr
,
sz
);
ptr
=
tor_mmap_anonymous
(
sz
,
ANONMAP_NOINHERIT
,
&
inherit
);
tt_ptr_op
(
ptr
,
OP_NE
,
0
);
memset
(
ptr
,
0xd0
,
sz
);
memset
(
ptr
,
(
uint8_t
)
TEST_VALUE
,
sz
);
tt_int_op
(
0
,
OP_EQ
,
pipe
(
pipefd
));
pid_t
child
=
fork
();
...
...
@@ -6220,7 +6221,7 @@ test_util_map_anon_nofork(void *arg)
// noinherit isn't implemented.
tt_int_op
(
inherit
,
OP_EQ
,
INHERIT_RES_KEEP
);
tt_int_op
((
int
)
r
,
OP_EQ
,
1
);
// child should send us a byte.
tt_int_op
(
buf
[
0
],
OP_EQ
,
0xd0
);
// that byte should
what we set it to
.
tt_int_op
(
buf
[
0
],
OP_EQ
,
TEST_VALUE
);
// that byte should
be TEST_VALUE
.
}
int
ws
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment