Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
fe96d982
Commit
fe96d982
authored
Sep 21, 2021
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release the panicstr_mtx before calling abort(2), but still protect against reentrancy.
Fixes: #3688
parent
45eef962
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
cache_panic.c
bin/varnishd/cache/cache_panic.c
+6
-3
No files found.
bin/varnishd/cache/cache_panic.c
View file @
fe96d982
...
@@ -718,9 +718,11 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
...
@@ -718,9 +718,11 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
struct
sigaction
sa
;
struct
sigaction
sa
;
int
err
=
errno
;
int
err
=
errno
;
AZ
(
pthread_mutex_lock
(
&
panicstr_mtx
));
/* Won't be released,
AZ
(
pthread_mutex_lock
(
&
panicstr_mtx
));
we're going to die
anyway */
/* If we already panic'ed, do nothing */
while
(
heritage
.
panic_str
[
0
])
sleep
(
1
);
/*
/*
* should we trigger a SIGSEGV while handling a panic, our sigsegv
* should we trigger a SIGSEGV while handling a panic, our sigsegv
...
@@ -809,6 +811,7 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
...
@@ -809,6 +811,7 @@ pan_ic(const char *func, const char *file, int line, const char *cond,
VSB_putc
(
pan_vsb
,
'\0'
);
/* NUL termination */
VSB_putc
(
pan_vsb
,
'\0'
);
/* NUL termination */
v_gcov_flush
();
v_gcov_flush
();
AZ
(
pthread_mutex_unlock
(
&
panicstr_mtx
));
abort
();
abort
();
}
}
...
...
Write
Preview
Markdown
is supported
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