The Samba-Bugzilla – Attachment 12075 Details for
Bug 11901
Reparenting in a destructor incorrectly terminates freeing of children leading to a memory leak.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.4.next.
tp (text/plain), 7.96 KB, created by
Jeremy Allison
on 2016-05-06 00:30:06 UTC
(
hide
)
Description:
git-am fix for 4.4.next.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2016-05-06 00:30:06 UTC
Size:
7.96 KB
patch
obsolete
>From 6ad52ac9f68425238185c9afc98325d0faa5a586 Mon Sep 17 00:00:00 2001 >From: Saji VR <saji.vr@nutanix.com> >Date: Wed, 4 May 2016 15:14:55 -0700 >Subject: [PATCH 1/2] lib:talloc. Fix memory leak when destructors reparent > children. > >If a destructor reparents a child, we shouldn't exit the >loop freeing children as there may be others to process. > >https://bugzilla.samba.org/show_bug.cgi?id=11901 > >Signed-off-by: Saji VR <saji.vr@nutanix.com> >Reviewed-by: Jeremy Allison <jra@samba.org> >Reviewed-by: Richard Sharpe <rsharpe@samba.org> >Reviewed-by: Ira Cooper <ira@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Thu May 5 08:33:53 CEST 2016 on sn-devel-144 > >(cherry picked from commit d4d14b15b6734e99f8527136ec007a97024ac348) >--- > lib/talloc/talloc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c >index 90b9d96..48d2033 100644 >--- a/lib/talloc/talloc.c >+++ b/lib/talloc/talloc.c >@@ -1528,7 +1528,7 @@ static inline void _talloc_free_children_internal(struct talloc_chunk *tc, > * Destructor already reparented this child. > * No further reparenting needed. > */ >- return; >+ continue; > } > if (new_parent == null_context) { > struct talloc_chunk *p = talloc_parent_chunk(ptr); >-- >2.8.0.rc3.226.g39d4020 > > >From 95105db09b5985dfa5e8811a699db794ef7c8f03 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Thu, 5 May 2016 10:18:57 +0200 >Subject: [PATCH 2/2] talloc: version 2.1.7 > >* Fix memory leak when destructors reparent children. (bug #11901) > >Signed-off-by: Stefan Metzmacher <metze@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Thu May 5 22:33:04 CEST 2016 on sn-devel-144 > >(cherry picked from commit 83b64ae64b315ccc37b9fce66f19ab0d342ad3ba) >--- > lib/talloc/ABI/pytalloc-util-2.1.7.sigs | 13 ++++++ > lib/talloc/ABI/pytalloc-util.py3-2.1.7.sigs | 12 ++++++ > lib/talloc/ABI/talloc-2.1.7.sigs | 65 +++++++++++++++++++++++++++++ > lib/talloc/wscript | 2 +- > 4 files changed, 91 insertions(+), 1 deletion(-) > create mode 100644 lib/talloc/ABI/pytalloc-util-2.1.7.sigs > create mode 100644 lib/talloc/ABI/pytalloc-util.py3-2.1.7.sigs > create mode 100644 lib/talloc/ABI/talloc-2.1.7.sigs > >diff --git a/lib/talloc/ABI/pytalloc-util-2.1.7.sigs b/lib/talloc/ABI/pytalloc-util-2.1.7.sigs >new file mode 100644 >index 0000000..666fec0 >--- /dev/null >+++ b/lib/talloc/ABI/pytalloc-util-2.1.7.sigs >@@ -0,0 +1,13 @@ >+_pytalloc_get_mem_ctx: TALLOC_CTX *(PyObject *) >+_pytalloc_get_ptr: void *(PyObject *) >+_pytalloc_get_type: void *(PyObject *, const char *) >+pytalloc_BaseObject_PyType_Ready: int (PyTypeObject *) >+pytalloc_BaseObject_check: int (PyObject *) >+pytalloc_BaseObject_size: size_t (void) >+pytalloc_CObject_FromTallocPtr: PyObject *(void *) >+pytalloc_Check: int (PyObject *) >+pytalloc_GetBaseObjectType: PyTypeObject *(void) >+pytalloc_GetObjectType: PyTypeObject *(void) >+pytalloc_reference_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *) >+pytalloc_steal: PyObject *(PyTypeObject *, void *) >+pytalloc_steal_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *) >diff --git a/lib/talloc/ABI/pytalloc-util.py3-2.1.7.sigs b/lib/talloc/ABI/pytalloc-util.py3-2.1.7.sigs >new file mode 100644 >index 0000000..4410f11 >--- /dev/null >+++ b/lib/talloc/ABI/pytalloc-util.py3-2.1.7.sigs >@@ -0,0 +1,12 @@ >+_pytalloc_get_mem_ctx: TALLOC_CTX *(PyObject *) >+_pytalloc_get_ptr: void *(PyObject *) >+_pytalloc_get_type: void *(PyObject *, const char *) >+pytalloc_BaseObject_PyType_Ready: int (PyTypeObject *) >+pytalloc_BaseObject_check: int (PyObject *) >+pytalloc_BaseObject_size: size_t (void) >+pytalloc_Check: int (PyObject *) >+pytalloc_GetBaseObjectType: PyTypeObject *(void) >+pytalloc_GetObjectType: PyTypeObject *(void) >+pytalloc_reference_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *) >+pytalloc_steal: PyObject *(PyTypeObject *, void *) >+pytalloc_steal_ex: PyObject *(PyTypeObject *, TALLOC_CTX *, void *) >diff --git a/lib/talloc/ABI/talloc-2.1.7.sigs b/lib/talloc/ABI/talloc-2.1.7.sigs >new file mode 100644 >index 0000000..9969ce3 >--- /dev/null >+++ b/lib/talloc/ABI/talloc-2.1.7.sigs >@@ -0,0 +1,65 @@ >+_talloc: void *(const void *, size_t) >+_talloc_array: void *(const void *, size_t, unsigned int, const char *) >+_talloc_free: int (void *, const char *) >+_talloc_get_type_abort: void *(const void *, const char *, const char *) >+_talloc_memdup: void *(const void *, const void *, size_t, const char *) >+_talloc_move: void *(const void *, const void *) >+_talloc_pooled_object: void *(const void *, size_t, const char *, unsigned int, size_t) >+_talloc_realloc: void *(const void *, void *, size_t, const char *) >+_talloc_realloc_array: void *(const void *, void *, size_t, unsigned int, const char *) >+_talloc_reference_loc: void *(const void *, const void *, const char *) >+_talloc_set_destructor: void (const void *, int (*)(void *)) >+_talloc_steal_loc: void *(const void *, const void *, const char *) >+_talloc_zero: void *(const void *, size_t, const char *) >+_talloc_zero_array: void *(const void *, size_t, unsigned int, const char *) >+talloc_asprintf: char *(const void *, const char *, ...) >+talloc_asprintf_append: char *(char *, const char *, ...) >+talloc_asprintf_append_buffer: char *(char *, const char *, ...) >+talloc_autofree_context: void *(void) >+talloc_check_name: void *(const void *, const char *) >+talloc_disable_null_tracking: void (void) >+talloc_enable_leak_report: void (void) >+talloc_enable_leak_report_full: void (void) >+talloc_enable_null_tracking: void (void) >+talloc_enable_null_tracking_no_autofree: void (void) >+talloc_find_parent_byname: void *(const void *, const char *) >+talloc_free_children: void (void *) >+talloc_get_name: const char *(const void *) >+talloc_get_size: size_t (const void *) >+talloc_increase_ref_count: int (const void *) >+talloc_init: void *(const char *, ...) >+talloc_is_parent: int (const void *, const void *) >+talloc_named: void *(const void *, size_t, const char *, ...) >+talloc_named_const: void *(const void *, size_t, const char *) >+talloc_parent: void *(const void *) >+talloc_parent_name: const char *(const void *) >+talloc_pool: void *(const void *, size_t) >+talloc_realloc_fn: void *(const void *, void *, size_t) >+talloc_reference_count: size_t (const void *) >+talloc_reparent: void *(const void *, const void *, const void *) >+talloc_report: void (const void *, FILE *) >+talloc_report_depth_cb: void (const void *, int, int, void (*)(const void *, int, int, int, void *), void *) >+talloc_report_depth_file: void (const void *, int, int, FILE *) >+talloc_report_full: void (const void *, FILE *) >+talloc_set_abort_fn: void (void (*)(const char *)) >+talloc_set_log_fn: void (void (*)(const char *)) >+talloc_set_log_stderr: void (void) >+talloc_set_memlimit: int (const void *, size_t) >+talloc_set_name: const char *(const void *, const char *, ...) >+talloc_set_name_const: void (const void *, const char *) >+talloc_show_parents: void (const void *, FILE *) >+talloc_strdup: char *(const void *, const char *) >+talloc_strdup_append: char *(char *, const char *) >+talloc_strdup_append_buffer: char *(char *, const char *) >+talloc_strndup: char *(const void *, const char *, size_t) >+talloc_strndup_append: char *(char *, const char *, size_t) >+talloc_strndup_append_buffer: char *(char *, const char *, size_t) >+talloc_test_get_magic: int (void) >+talloc_total_blocks: size_t (const void *) >+talloc_total_size: size_t (const void *) >+talloc_unlink: int (const void *, void *) >+talloc_vasprintf: char *(const void *, const char *, va_list) >+talloc_vasprintf_append: char *(char *, const char *, va_list) >+talloc_vasprintf_append_buffer: char *(char *, const char *, va_list) >+talloc_version_major: int (void) >+talloc_version_minor: int (void) >diff --git a/lib/talloc/wscript b/lib/talloc/wscript >index ae0b2276..98e3b7d 100644 >--- a/lib/talloc/wscript >+++ b/lib/talloc/wscript >@@ -1,7 +1,7 @@ > #!/usr/bin/env python > > APPNAME = 'talloc' >-VERSION = '2.1.6' >+VERSION = '2.1.7' > > > blddir = 'bin' >-- >2.8.0.rc3.226.g39d4020 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 11901
:
12070
|
12075
|
12080