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
215a1c88
Commit
215a1c88
authored
Jul 28, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that smp_object always are a multiple of 8 bytes.
parent
380c9351
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
storage_persistent.h
bin/varnishd/storage/storage_persistent.h
+1
-0
storage_persistent_mgt.c
bin/varnishd/storage/storage_persistent_mgt.c
+4
-0
No files found.
bin/varnishd/storage/storage_persistent.h
View file @
215a1c88
...
@@ -145,6 +145,7 @@ struct smp_segptr {
...
@@ -145,6 +145,7 @@ struct smp_segptr {
struct
smp_object
{
struct
smp_object
{
uint8_t
hash
[
32
];
/* really: DIGEST_LEN */
uint8_t
hash
[
32
];
/* really: DIGEST_LEN */
struct
exp
exp
;
struct
exp
exp
;
uint32_t
__filler__
;
/* -> align/8 on 32bit */
double
ban
;
double
ban
;
uint64_t
ptr
;
/* rel to silo */
uint64_t
ptr
;
/* rel to silo */
};
};
...
...
bin/varnishd/storage/storage_persistent_mgt.c
View file @
215a1c88
...
@@ -136,6 +136,10 @@ smp_mgt_init(struct stevedore *parent, int ac, char * const *av)
...
@@ -136,6 +136,10 @@ smp_mgt_init(struct stevedore *parent, int ac, char * const *av)
ASSERT_MGT
();
ASSERT_MGT
();
AZ
(
av
[
ac
]);
AZ
(
av
[
ac
]);
/* Necessary alignment. See also smp_object::__filler__ */
assert
(
sizeof
(
struct
smp_object
)
%
8
==
0
);
#define SIZOF(foo) fprintf(stderr, \
#define SIZOF(foo) fprintf(stderr, \
"sizeof(%s) = %zu = 0x%zx\n", #foo, sizeof(foo), sizeof(foo));
"sizeof(%s) = %zu = 0x%zx\n", #foo, sizeof(foo), sizeof(foo));
SIZOF
(
struct
smp_ident
);
SIZOF
(
struct
smp_ident
);
...
...
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