Skip to content

Commit 2e8defc

Browse files
committed
[agroal#393] Add Valgrind support
Modified AUTHORS file
1 parent cc10abc commit 2e8defc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+306
-40
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ Luca Ferrari <fluca1978@gmail.com>
88
Nikita Bugrovsky <nbugrovs@redhat.com>
99
Lawrence Wu <lawrence910426@gmail.com>
1010
Yongting You <2010youy01@gmail.com>
11+
Ashutosh Sharma <ash2003sharma@gmail.com>

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ projects.
3333
This code of conduct applies both within project spaces and in public spaces
3434
when an individual is representing the project or its community.
3535

36-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a maintainer of the project, Jesper Pedersen <jesper.pedersen@redhat.com>.
36+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a maintainer of the project, Jesper Pedersen <jesper.pedersen@comcast.net>.
3737

3838
### pgagroal Events Code of Conduct
3939

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
Copyright (C) 2023 Red Hat
2+
Copyright (C) 2024 The pgagroal community
33

44
Redistribution and use in source and binary forms, with or without modification,
55
are permitted provided that the following conditions are met:

contrib/valgrind/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Valgrind
2+
3+
The [Valgrind](https://valgrind.org/) tool suite provides a number of debugging and profiling tools that help you make your programs faster and more correct. The most popular and the default of these tools is called **Memcheck**. It can detect many memory-related errors that can lead to crashes and unpredictable behaviour.
4+
5+
# Run memory management detection
6+
7+
``` bash
8+
valgrind --leak-check=full --show-leak-kinds=all --log-file=%p.log --trace-children=yes --track-origins=yes --read-var-info=yes ./pgagroal -c pgagroal.conf -a pgagroal_hba.conf
9+
```
10+
11+
# Generate valgrind report with suppressed rules
12+
13+
``` bash
14+
valgrind --suppressions=../../contrib/valgrind/pgagroal.supp --leak-check=full --show-leak-kinds=all --log-file=%p.log --trace-children=yes --track-origins=yes --read-var-info=yes ./pgagroal -c pgagroal.conf -a pgagroal_hba.conf
15+
```
16+

contrib/valgrind/pgagroal.supp

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
#
2+
# pgagroal rules (Functions that are invoked directly from main)
3+
#
4+
5+
{
6+
pgagroal_bind_host
7+
Memcheck:Leak
8+
match-leak-kinds: reachable
9+
fun:calloc
10+
fun:bind_host
11+
fun:pgagroal_bind
12+
fun:main
13+
}
14+
15+
{
16+
pgagroal_set_proc_title_calloc
17+
Memcheck:Leak
18+
match-leak-kinds: indirect
19+
fun:calloc
20+
fun:pgagroal_set_proc_title
21+
fun:main
22+
}
23+
24+
{
25+
pgagroal_set_proc_title_malloc
26+
Memcheck:Leak
27+
match-leak-kinds: definite
28+
fun:malloc
29+
fun:pgagroal_set_proc_title
30+
fun:main
31+
}
32+
33+
#
34+
# non-pgagroal rules
35+
#
36+
37+
{
38+
dl_open_malloc
39+
Memcheck:Leak
40+
match-leak-kinds: reachable
41+
fun:malloc
42+
fun:UnknownInlinedFun
43+
fun:_dl_new_object
44+
fun:_dl_map_object_from_fd
45+
fun:_dl_map_object
46+
fun:dl_open_worker_begin
47+
fun:_dl_catch_exception
48+
fun:dl_open_worker
49+
fun:_dl_catch_exception
50+
fun:_dl_open
51+
fun:dlopen_doit
52+
fun:_dl_catch_exception
53+
fun:_dl_catch_error
54+
}
55+
56+
{
57+
dl_open_inline_calloc
58+
Memcheck:Leak
59+
match-leak-kinds: reachable
60+
fun:calloc
61+
fun:UnknownInlinedFun
62+
fun:_dl_check_map_versions
63+
fun:dl_open_worker_begin
64+
fun:_dl_catch_exception
65+
fun:dl_open_worker
66+
fun:_dl_catch_exception
67+
fun:_dl_open
68+
fun:dlopen_doit
69+
fun:_dl_catch_exception
70+
fun:_dl_catch_error
71+
fun:_dlerror_run
72+
fun:UnknownInlinedFun
73+
fun:dlopen@@GLIBC_2.34
74+
}
75+
76+
{
77+
dl_open_calloc
78+
Memcheck:Leak
79+
match-leak-kinds: reachable
80+
fun:calloc
81+
fun:UnknownInlinedFun
82+
fun:_dl_new_object
83+
fun:_dl_map_object_from_fd
84+
fun:_dl_map_object
85+
fun:dl_open_worker_begin
86+
fun:_dl_catch_exception
87+
fun:dl_open_worker
88+
fun:_dl_catch_exception
89+
fun:_dl_open
90+
fun:dlopen_doit
91+
fun:_dl_catch_exception
92+
fun:_dl_catch_error
93+
}
94+
95+
{
96+
dl_open_worker_malloc
97+
Memcheck:Leak
98+
match-leak-kinds: reachable
99+
fun:malloc
100+
fun:malloc
101+
fun:strdup
102+
fun:_dl_map_object
103+
fun:dl_open_worker_begin
104+
fun:_dl_catch_exception
105+
fun:dl_open_worker
106+
fun:_dl_catch_exception
107+
fun:_dl_open
108+
fun:dlopen_doit
109+
fun:_dl_catch_exception
110+
fun:_dl_catch_error
111+
fun:_dlerror_run
112+
}
113+
114+
{
115+
ev_loop_periodics_realloc
116+
Memcheck:Leak
117+
match-leak-kinds: reachable
118+
fun:realloc
119+
fun:ev_realloc
120+
fun:feed_reverse
121+
fun:periodics_reify
122+
fun:ev_run.cold
123+
fun:ev_loop
124+
fun:main
125+
}
126+
127+
{
128+
ev_loop_timers_realloc
129+
Memcheck:Leak
130+
match-leak-kinds: reachable
131+
fun:realloc
132+
fun:ev_realloc
133+
fun:feed_reverse
134+
fun:timers_reify
135+
fun:ev_run.cold
136+
fun:ev_loop
137+
fun:main
138+
}
139+
140+
{
141+
ev_io_realloc
142+
Memcheck:Leak
143+
match-leak-kinds: reachable
144+
fun:realloc
145+
fun:ev_realloc
146+
fun:fd_change
147+
fun:ev_io_start.cold
148+
fun:evtimerfd_init
149+
fun:ev_periodic_start.cold
150+
fun:main
151+
}
152+
153+
{
154+
ev_io_management_realloc
155+
Memcheck:Leak
156+
match-leak-kinds: reachable
157+
fun:realloc
158+
fun:ev_realloc
159+
fun:ev_io_start.cold
160+
fun:start_management
161+
fun:main
162+
}
163+
164+
{
165+
ev_io_uds_realloc
166+
Memcheck:Leak
167+
match-leak-kinds: reachable
168+
fun:realloc
169+
fun:ev_realloc
170+
fun:ev_io_start.cold
171+
fun:start_uds
172+
fun:main
173+
}
174+
175+
{
176+
ev_io_metrics_realloc
177+
Memcheck:Leak
178+
match-leak-kinds: reachable
179+
fun:realloc
180+
fun:ev_realloc
181+
fun:ev_io_start.cold
182+
fun:start_metrics
183+
fun:main
184+
}
185+
186+
{
187+
ev_periodics_realloc
188+
Memcheck:Leak
189+
match-leak-kinds: reachable
190+
fun:realloc
191+
fun:ev_realloc
192+
fun:ev_feed_event.cold
193+
fun:feed_reverse_done
194+
fun:periodics_reify
195+
fun:ev_run
196+
fun:ev_loop
197+
fun:main
198+
}
199+
200+
{
201+
ev_periodics_start_realloc
202+
Memcheck:Leak
203+
match-leak-kinds: reachable
204+
fun:realloc
205+
fun:ev_realloc
206+
fun:ev_periodic_start.cold
207+
fun:main
208+
}
209+
210+
{
211+
ev_epoll_realloc
212+
Memcheck:Leak
213+
match-leak-kinds: reachable
214+
fun:realloc
215+
fun:ev_realloc
216+
...
217+
fun:epoll_init
218+
fun:loop_init
219+
fun:ev_default_loop
220+
fun:main
221+
}
222+
223+
{
224+
ev_fd_event_realloc
225+
Memcheck:Leak
226+
match-leak-kinds: reachable
227+
fun:realloc
228+
fun:ev_realloc
229+
fun:ev_feed_event.cold
230+
fun:fd_event_nocheck
231+
fun:fd_event
232+
fun:epoll_poll
233+
...
234+
fun:ev_run
235+
fun:ev_loop
236+
fun:main
237+
}
238+
239+
{
240+
ev_fd_change_realloc
241+
Memcheck:Leak
242+
match-leak-kinds: reachable
243+
fun:realloc
244+
fun:ev_realloc
245+
fun:fd_change
246+
fun:ev_io_start.cold
247+
...
248+
fun:main
249+
}

src/admin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/cli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/configuration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/logging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/management.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/message.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/network.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/pgagroal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/pipeline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/pool.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/prometheus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/remote.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/security.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/server.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

src/include/shmem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2023 Red Hat
2+
* Copyright (C) 2024 The pgagroal community
33
*
44
* Redistribution and use in source and binary forms, with or without modification,
55
* are permitted provided that the following conditions are met:

0 commit comments

Comments
 (0)