Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
a6fb72a8
Commit
a6fb72a8
authored
May 18, 2021
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: exit with error on win32 leakcheck
parent
b5dcdad3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
0 deletions
+16
-0
src/win32/w32_leakcheck.c
+5
-0
src/win32/w32_leakcheck.h
+2
-0
tests/main.c
+9
-0
No files found.
src/win32/w32_leakcheck.c
View file @
a6fb72a8
...
...
@@ -558,6 +558,11 @@ static void git_win32_leakcheck_global_shutdown(void)
git_win32_leakcheck_stack_cleanup
();
}
bool
git_win32_leakcheck_has_leaks
(
void
)
{
return
(
g_transient_count_total_leaks
>
0
);
}
int
git_win32_leakcheck_global_init
(
void
)
{
git_win32_leakcheck_stacktrace_init
();
...
...
src/win32/w32_leakcheck.h
View file @
a6fb72a8
...
...
@@ -21,6 +21,8 @@ int git_win32_leakcheck_global_init(void);
#include "git2/errors.h"
#include "strnlen.h"
bool
git_win32_leakcheck_has_leaks
(
void
);
/* Stack frames (for stack tracing, below) */
/**
...
...
tests/main.c
View file @
a6fb72a8
#include "clar_libgit2.h"
#include "clar_libgit2_trace.h"
#ifdef GIT_WIN32_LEAKCHECK
# include "win32/w32_leakcheck.h"
#endif
#ifdef _WIN32
int
__cdecl
main
(
int
argc
,
char
*
argv
[])
#else
...
...
@@ -29,6 +33,11 @@ int main(int argc, char *argv[])
cl_global_trace_disable
();
git_libgit2_shutdown
();
#ifdef GIT_WIN32_LEAKCHECK
if
(
git_win32_leakcheck_has_leaks
())
res
=
res
||
1
;
#endif
at_exit_cmd
=
getenv
(
"CLAR_AT_EXIT"
);
if
(
at_exit_cmd
!=
NULL
)
{
int
at_exit
=
system
(
at_exit_cmd
);
...
...
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