Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
debian
tor
Commits
bf8d6636
Commit
bf8d6636
authored
14 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge commit 'public/warn1125'
parents
15379a72
8150e2ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/warn1125
+5
-0
5 additions, 0 deletions
changes/warn1125
src/or/buffers.c
+15
-4
15 additions, 4 deletions
src/or/buffers.c
with
20 additions
and
4 deletions
changes/warn1125
0 → 100644
+
5
−
0
View file @
bf8d6636
o Minor bugfixes:
- Instead of giving an assertion failure on an internal mismatch
on estimated freelist size, just log a BUG warning and try later.
Mitigates but does not fix bug 1125.
This diff is collapsed.
Click to expand it.
src/or/buffers.c
+
15
−
4
View file @
bf8d6636
...
...
@@ -270,14 +270,25 @@ buf_shrink_freelists(int free_all)
(
freelists
[
i
].
lowest_length
-
slack
);
int
n_to_skip
=
freelists
[
i
].
cur_length
-
n_to_free
;
int
orig_n_to_free
=
n_to_free
,
n_freed
=
0
;
int
orig_n_to_skip
=
n_to_skip
;
int
new_length
=
n_to_skip
;
chunk_t
**
chp
=
&
freelists
[
i
].
head
;
chunk_t
*
chunk
;
log_info
(
LD_MM
,
"Cleaning freelist for %d-byte chunks: keeping %d, "
"dropping %d."
,
(
int
)
freelists
[
i
].
alloc_size
,
n_to_skip
,
n_to_free
);
log_info
(
LD_MM
,
"Cleaning freelist for %d-byte chunks: length %d, "
"keeping %d, dropping %d."
,
(
int
)
freelists
[
i
].
alloc_size
,
freelists
[
i
].
cur_length
,
n_to_skip
,
n_to_free
);
tor_assert
(
n_to_skip
+
n_to_free
==
freelists
[
i
].
cur_length
);
while
(
n_to_skip
)
{
tor_assert
((
*
chp
)
->
next
);
if
(
!
(
*
chp
)
->
next
)
{
log_warn
(
LD_BUG
,
"I wanted to skip %d chunks in the freelist for "
"%d-byte chunks, but only found %d. (Length %d)"
,
orig_n_to_skip
,
(
int
)
freelists
[
i
].
alloc_size
,
orig_n_to_skip
-
n_to_skip
,
freelists
[
i
].
cur_length
);
assert_freelist_ok
(
&
freelists
[
i
]);
return
;
}
// tor_assert((*chp)->next);
chp
=
&
(
*
chp
)
->
next
;
--
n_to_skip
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment