Skip to content

Commit 2f1f443

Browse files
committed
Add valgrind suppressions for python code.
Python's allocator does some low-level tricks for efficiency; unfortunately they trigger valgrind errors. Those tricks can be disabled making instrumentation easier; but few people testing postgres will have such a build of python. So add broad suppressions of the resulting errors. See also https://svn.python.org/projects/python/trunk/Misc/README.valgrind This possibly will suppress valid errors, but without it it's basically impossible to use valgrind with plpython code. Author: Andres Freund Backpatch: 9.4, where we started to maintain valgrind suppressions
1 parent 5e43bee commit 2f1f443

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

src/tools/valgrind.supp

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,69 @@
146146
fun:pg_atomic_write_u64_impl
147147
fun:pg_atomic_init_u64_impl
148148
}
149+
150+
151+
# Python's allocator does some low-level tricks for efficiency. Those
152+
# can be disabled for better instrumentation; but few people testing
153+
# postgres will have such a build of python. So add broad
154+
# suppressions of the resulting errors.
155+
# See also https://svn.python.org/projects/python/trunk/Misc/README.valgrind
156+
{
157+
python_clever_allocator
158+
Memcheck:Addr4
159+
fun:PyObject_Free
160+
}
161+
162+
{
163+
python_clever_allocator
164+
Memcheck:Addr8
165+
fun:PyObject_Free
166+
}
167+
168+
{
169+
python_clever_allocator
170+
Memcheck:Value4
171+
fun:PyObject_Free
172+
}
173+
174+
{
175+
python_clever_allocator
176+
Memcheck:Value8
177+
fun:PyObject_Free
178+
}
179+
180+
{
181+
python_clever_allocator
182+
Memcheck:Cond
183+
fun:PyObject_Free
184+
}
185+
186+
{
187+
python_clever_allocator
188+
Memcheck:Addr4
189+
fun:PyObject_Realloc
190+
}
191+
192+
{
193+
python_clever_allocator
194+
Memcheck:Addr8
195+
fun:PyObject_Realloc
196+
}
197+
198+
{
199+
python_clever_allocator
200+
Memcheck:Value4
201+
fun:PyObject_Realloc
202+
}
203+
204+
{
205+
python_clever_allocator
206+
Memcheck:Value8
207+
fun:PyObject_Realloc
208+
}
209+
210+
{
211+
python_clever_allocator
212+
Memcheck:Cond
213+
fun:PyObject_Realloc
214+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy