]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
bindings: python: Fix race conditions at arguments access 866/head
authorMatwey V. Kornilov <matwey.kornilov@gmail.com>
Sat, 27 Jan 2018 08:33:23 +0000 (11:33 +0300)
committerMatwey V. Kornilov <matwey.kornilov@gmail.com>
Sat, 27 Jan 2018 08:33:23 +0000 (11:33 +0300)
commit1361a73d813920a2a6907e0eb46e7fc045187d1f
tree0e8242f05b7e2dce71ba510120613cb0a6a20171
parent3ba510bdf0888dc1cb52931338043b618bd2ca8b
bindings: python: Fix race conditions at arguments access

rrdtool_argv and rrdtool_argc have to be allocated at each function stack in
order to have copy of variables for each running thread. Note that we call
librrd functions with GIL unlocked, so previously there was simultaneous access
to global rrdtool_argv and rrdtool_argc variables.

Fixes: 8949308812a0 ("Unlock the global thread lock while processing rrd")
Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com>
bindings/python/rrdtoolmodule.c