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
92f3d075
Commit
92f3d075
authored
Jun 11, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try adding a memory barrier on the varnishd side, and use the JSON offset
as canary on the API side.
parent
57a3042d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
common_vsc.c
bin/varnishd/common/common_vsc.c
+3
-1
vsc.c
lib/libvarnishapi/vsc.c
+6
-0
No files found.
bin/varnishd/common/common_vsc.c
View file @
92f3d075
...
...
@@ -39,6 +39,7 @@
#include "vend.h"
#include "vgz.h"
#include "vmb.h"
#include "vapi/vsc_int.h"
/*--------------------------------------------------------------------*/
...
...
@@ -79,7 +80,6 @@ VSC_Alloc(const char *nm, size_t sd,
AN
(
p
);
memset
(
p
,
0
,
sd
);
vbe64enc
(
p
,
sd
);
memset
(
&
vz
,
0
,
sizeof
vz
);
assert
(
Z_OK
==
inflateInit2
(
&
vz
,
31
));
...
...
@@ -94,6 +94,8 @@ VSC_Alloc(const char *nm, size_t sd,
vsg
->
seg
=
p
;
vsg
->
ptr
=
p
+
8
;
VTAILQ_INSERT_TAIL
(
&
vsc_seglist
,
vsg
,
list
);
VWMB
();
vbe64enc
(
p
,
sd
);
return
(
p
+
8
);
}
...
...
lib/libvarnishapi/vsc.c
View file @
92f3d075
...
...
@@ -37,6 +37,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "vdef.h"
#include "vas.h"
...
...
@@ -300,6 +301,11 @@ vsc_build_vf_list(struct vsm *vd)
continue
;
AZ
(
VSM_Map
(
vd
,
&
vsc
->
iter_fantom
));
u
=
vbe64dec
(
vsc
->
iter_fantom
.
b
);
if
(
u
==
0
)
{
VRMB
();
usleep
(
100000
);
u
=
vbe64dec
(
vsc
->
iter_fantom
.
b
);
}
assert
(
u
>
0
);
p
=
(
char
*
)
vsc
->
iter_fantom
.
b
+
8
+
u
;
vj
=
vjsn_parse
(
p
,
&
e
);
...
...
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