Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
slash
Commits
6445c85c
Unverified
Commit
6445c85c
authored
Sep 19, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an allocation limit injection facility
parent
90a80e1f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
fellow_inject.h
src/fellow_inject.h
+14
-1
flint.lnt
src/flint.lnt
+1
-1
No files found.
src/fellow_inject.h
View file @
6445c85c
...
...
@@ -100,6 +100,18 @@ fc_inj_err(const char *err)
#define FC_INJ fc_inj_injected(__func__, __LINE__)
#define FC_ERRSTR(x) fc_inj_err(x)
_Thread_local
size_t
size_limit
=
SIZE_MAX
;
#define FC_INJ_SZLIM(x) do { \
if (x > size_limit) { \
DBG("%s limited from %zu to %zu", \
#x, x, size_limit); \
x = size_limit; \
} \
size_limit = SIZE_MAX; \
} while (0)
#define FC_INJ_SZLIM_SET(x) size_limit = x
#else // FCERR_INJECT
#define FC_INJ 0
...
...
@@ -107,6 +119,7 @@ fc_inj_err(const char *err)
#define fc_inj_reset() (void)0
#define fc_inj_set(x) (void)0
#define fc_inj_count() 0
#define FC_INJ_SZLIM(x) (void)0
#define FC_INJ_SZLIM_SET(x) (void)0
#endif // FCERR_INJECT
src/flint.lnt
View file @
6445c85c
...
...
@@ -78,7 +78,7 @@
// symbol not ref (constructor)
-esym(528, init_fcos_transitions, assert_fcos*)
-esym(755, BWIT_*)
-esym(755, fc_inj_*
)
-esym(755, fc_inj_*
, FC_INJ_SZLIM_SET) // not referenced
// fellow_io_uring.c
-emacro(835, BLKDISCARD)
...
...
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