Discussion:
[PATCHES] fix bugs in the python bindings
(too old to reply)
Douglas Bagnall via samba-technical
2018-05-03 04:12:10 UTC
Permalink
Procrastinating again, I found a number of segfaults and a seemingly
endless series of memory leaks and unchecked allocations in the Python
bindings. I managed to stop myself after the attached patches.

Douglas
William Brown via samba-technical
2018-05-03 04:40:52 UTC
Permalink
On Thu, 2018-05-03 at 16:12 +1200, Douglas Bagnall via samba-technical
Post by Douglas Bagnall via samba-technical
Procrastinating again, I found a number of segfaults and a seemingly
endless series of memory leaks and unchecked allocations in the Python
bindings. I managed to stop myself after the attached patches.
Douglas
Most of this looks sane to me. It's a pretty big patch though. I'd want
to run it with ASAN to be sure, but that may highlight more outstanding
cases.

Thanks,

William
Douglas Bagnall via samba-technical
2018-05-03 05:36:46 UTC
Permalink
There was a mistake lurking in there. New version attached.
Post by William Brown via samba-technical
On Thu, 2018-05-03 at 16:12 +1200, Douglas Bagnall via samba-technical
Post by Douglas Bagnall via samba-technical
Procrastinating again, I found a number of segfaults and a seemingly
endless series of memory leaks and unchecked allocations in the Python
bindings. I managed to stop myself after the attached patches.
Douglas
Most of this looks sane to me. It's a pretty big patch though. I'd want
to run it with ASAN to be sure, but that may highlight more outstanding
cases.
Yep. There are also about a million outstanding cases I don't think it
will catch, namely the lack of Py_DECREF()s and failures to consider
NULL values from Python allocations. Given the way we use Python in
short-lived little processes, those are annoying but not really interesting.

Douglas
Douglas Bagnall via samba-technical
2018-05-04 04:32:34 UTC
Permalink
Post by Douglas Bagnall via samba-technical
There was a mistake lurking in there. New version attached.
OK, there are still problems, so I will look again next week.

Douglas
Post by Douglas Bagnall via samba-technical
Post by William Brown via samba-technical
On Thu, 2018-05-03 at 16:12 +1200, Douglas Bagnall via samba-technical
Post by Douglas Bagnall via samba-technical
Procrastinating again, I found a number of segfaults and a seemingly
endless series of memory leaks and unchecked allocations in the Python
bindings. I managed to stop myself after the attached patches.
Douglas
Most of this looks sane to me. It's a pretty big patch though. I'd want
to run it with ASAN to be sure, but that may highlight more outstanding
cases.
Yep. There are also about a million outstanding cases I don't think it
will catch, namely the lack of Py_DECREF()s and failures to consider
NULL values from Python allocations. Given the way we use Python in
short-lived little processes, those are annoying but not really interesting.
Douglas
Loading...