<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/talloc/talloc.c, branch talloc-2.3.3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>lib: talloc: Remove the ALWAYS_REALLOC code paths.</title>
<updated>2020-11-10T19:49:33+00:00</updated>
<author>
<name>Jeremy Allison</name>
<email>jra@samba.org</email>
</author>
<published>2020-11-09T19:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6598e00e129bc8b36d6d38345b67aba48b3eb26d'/>
<id>6598e00e129bc8b36d6d38345b67aba48b3eb26d</id>
<content type='text'>
This is now never set, and also never tested, and only makes
the talloc code more complicated.

Once this is gone we can start looking at the memlimit
stuff.

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Alexander Bokovoy &lt;ab@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is now never set, and also never tested, and only makes
the talloc code more complicated.

Once this is gone we can start looking at the memlimit
stuff.

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Alexander Bokovoy &lt;ab@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>talloc: alternatively use prama init for constructors if supported</title>
<updated>2020-11-10T06:53:43+00:00</updated>
<author>
<name>Björn Jacke</name>
<email>bj@sernet.de</email>
</author>
<published>2020-10-30T11:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f13e1ca54a2a448dd87809496e4b6da5af1589e8'/>
<id>f13e1ca54a2a448dd87809496e4b6da5af1589e8</id>
<content type='text'>
Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Bjoern Jacke &lt;bjacke@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: talloc: Fix memlimit on pool realloc.</title>
<updated>2020-11-09T02:46:50+00:00</updated>
<author>
<name>Jeremy Allison</name>
<email>jra@samba.org</email>
</author>
<published>2020-10-20T17:52:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=4566ee91b8c37f62e8b56242a48230db59cd5ff0'/>
<id>4566ee91b8c37f62e8b56242a48230db59cd5ff0</id>
<content type='text'>
We only have to do the memlimit check before any
real malloc or realloc. Allocations out of a
memory pool have already been counted in the
memory limit, so don't check in those cases.

This is an application-visible change (although
fixing a bug) so bump the ABI to 2.3.1 -&gt; 2.3.2.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14540

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Signed-off-by: Arran Cudbard-Bell &lt;a.cudbardb@freeradius.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We only have to do the memlimit check before any
real malloc or realloc. Allocations out of a
memory pool have already been counted in the
memory limit, so don't check in those cases.

This is an application-visible change (although
fixing a bug) so bump the ABI to 2.3.1 -&gt; 2.3.2.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14540

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Signed-off-by: Arran Cudbard-Bell &lt;a.cudbardb@freeradius.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: talloc: Fix pool object accounting when doing talloc_realloc() in the ALWAYS_REALLOC compiled case.</title>
<updated>2020-11-09T02:46:49+00:00</updated>
<author>
<name>Jeremy Allison</name>
<email>jra@samba.org</email>
</author>
<published>2020-10-20T19:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6e0aab0b4038255b2d63e8687924a21d77bace91'/>
<id>6e0aab0b4038255b2d63e8687924a21d77bace91</id>
<content type='text'>
tc_alloc_pool() or the fallback malloc can return NULL.

Wait until we know we are returning a valid pointer
before decrementing pool_hdr-&gt;object_count due to
reallocing out of the talloc_pool.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14540

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
tc_alloc_pool() or the fallback malloc can return NULL.

Wait until we know we are returning a valid pointer
before decrementing pool_hdr-&gt;object_count due to
reallocing out of the talloc_pool.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14540

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: talloc: Cleanup. Use consistent preprocessor logic macros.</title>
<updated>2020-11-09T02:46:49+00:00</updated>
<author>
<name>Jeremy Allison</name>
<email>jra@samba.org</email>
</author>
<published>2020-10-20T19:18:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=86eb6423bdcedf3433f3dbcf026573a238cf0d87'/>
<id>86eb6423bdcedf3433f3dbcf026573a238cf0d87</id>
<content type='text'>
Match other use of ALWAYS_REALLOC.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14540

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Match other use of ALWAYS_REALLOC.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14540

Signed-off-by: Jeremy Allison &lt;jra@samba.org&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>talloc: Mark ptr of talloc_unlink() not as a tainted scalar</title>
<updated>2020-06-09T16:02:59+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2020-06-09T15:00:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=9e922b75d0a28a4c882863150af73161f019fdb3'/>
<id>9e922b75d0a28a4c882863150af73161f019fdb3</id>
<content type='text'>
This should address a lot of issues reported by Coverity.

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should address a lot of issues reported by Coverity.

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>talloc: Fix alignment issues for casting pointers</title>
<updated>2019-03-19T12:38:50+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2018-10-12T09:58:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b2c2c4c3e6c4538c62cbcf03923bd7536292f7e9'/>
<id>b2c2c4c3e6c4538c62cbcf03923bd7536292f7e9</id>
<content type='text'>
warning: cast from 'char *' to 'struct talloc_chunk *' increases required
alignment from 1 to 8

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Tue Mar 19 12:38:50 UTC 2019 on sn-devel-144
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
warning: cast from 'char *' to 'struct talloc_chunk *' increases required
alignment from 1 to 8

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Tue Mar 19 12:38:50 UTC 2019 on sn-devel-144
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:talloc: Fix undefined behavior in talloc_memdup</title>
<updated>2018-12-12T17:34:10+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2018-11-22T15:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=eabe6d534c5c8c6ca38f3dc846f17aad6395da8c'/>
<id>eabe6d534c5c8c6ca38f3dc846f17aad6395da8c</id>
<content type='text'>
lib/talloc/talloc.c:2419: runtime error: null pointer passed as argument
2, which is declared to never be null

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lib/talloc/talloc.c:2419: runtime error: null pointer passed as argument
2, which is declared to never be null

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Volker Lendecke &lt;vl@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>talloc: use atexit() again instead of a library destructor</title>
<updated>2018-04-05T11:01:20+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2018-04-03T11:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=03124c85f1141f1e57398e526f38798b6f1fa741'/>
<id>03124c85f1141f1e57398e526f38798b6f1fa741</id>
<content type='text'>
The change for https://bugzilla.samba.org/show_bug.cgi?id=7587
("talloc_autofree_context() in shared libraries and plugins is a bad idea on FreeBSD")
(ommit 41b6810ba01f44537f470c806adb8686e1a39c48)
causes the following for sssd on Linux:

     Stack trace of thread 19667:
     #0  0x00007f2cab91ff6b __GI_raise (libc.so.6)
     #1  0x00007f2cab90a5c1 __GI_abort (libc.so.6)
     #2  0x00007f2cab90a491 __assert_fail_base (libc.so.6)
     #3  0x00007f2cab9186e2 __GI___assert_fail (libc.so.6)
     #4  0x00007f2cb10aaca5 k5_mutex_lock (libkrb5.so.3)
     #5  0x00007f2cb10ab790 k5_mutex_lock (libkrb5.so.3)
     #6  0x00007f2cb10ab8f5 profile_free_file (libkrb5.so.3)
     #7  0x00007f2cb10ab983 profile_close_file (libkrb5.so.3)
     #8  0x00007f2cb10af249 profile_release (libkrb5.so.3)
     #9  0x00007f2cb10a06c7 k5_os_free_context (libkrb5.so.3)
     #10 0x00007f2cb1075a9a krb5_free_context (libkrb5.so.3)
     #11 0x000055cea7cb2dd1 kcm_data_destructor (sssd_kcm)
     #12 0x00007f2cac153e96 _tc_free_internal (libtalloc.so.2)
     #13 0x00007f2cac1537b0 _tc_free_internal (libtalloc.so.2)
     #14 0x00007f2cac1537b0 _tc_free_internal (libtalloc.so.2)
     #15 0x00007f2cac1537b0 _tc_free_internal (libtalloc.so.2)
     #16 0x00007f2cac1537b0 _tc_free_internal (libtalloc.so.2)
     #17 0x00007f2cac14e648 _talloc_free (libtalloc.so.2)
     #18 0x00007f2cac14c480 talloc_lib_fini (libtalloc.so.2)
     #19 0x00007f2cb151da96 _dl_fini (ld-linux-x86-64.so.2)
     #20 0x00007f2cab9226bc __run_exit_handlers (libc.so.6)
     #21 0x00007f2cab9227ec __GI_exit (libc.so.6)
     #22 0x00007f2cb030dc61 orderly_shutdown (libsss_util.so)
     #23 0x00007f2cac365a46 tevent_common_check_signal (libtevent.so.0)
     #24 0x00007f2cac367975 epoll_event_loop_once (libtevent.so.0)
     #25 0x00007f2cac365dab std_event_loop_once (libtevent.so.0)
     #26 0x00007f2cac362098 _tevent_loop_once (libtevent.so.0)
     #27 0x00007f2cac3622eb tevent_common_loop_wait (libtevent.so.0)
     #28 0x00007f2cac365d3b std_event_loop_wait (libtevent.so.0)
     #29 0x00007f2cb030eb37 server_loop (libsss_util.so)
     #30 0x000055cea7cb29f4 main (sssd_kcm)
     #31 0x00007f2cab90c1eb __libc_start_main (libc.so.6)
     #32 0x000055cea7cb2c7a _start (sssd_kcm)

We still only register one atexit handler instead of multiple ones
like in talloc 2.1.11, but avoids using a library destructor.

Bug #7587 seems to be fixed by not using talloc_autofree_context()
within samba.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13366

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The change for https://bugzilla.samba.org/show_bug.cgi?id=7587
("talloc_autofree_context() in shared libraries and plugins is a bad idea on FreeBSD")
(ommit 41b6810ba01f44537f470c806adb8686e1a39c48)
causes the following for sssd on Linux:

     Stack trace of thread 19667:
     #0  0x00007f2cab91ff6b __GI_raise (libc.so.6)
     #1  0x00007f2cab90a5c1 __GI_abort (libc.so.6)
     #2  0x00007f2cab90a491 __assert_fail_base (libc.so.6)
     #3  0x00007f2cab9186e2 __GI___assert_fail (libc.so.6)
     #4  0x00007f2cb10aaca5 k5_mutex_lock (libkrb5.so.3)
     #5  0x00007f2cb10ab790 k5_mutex_lock (libkrb5.so.3)
     #6  0x00007f2cb10ab8f5 profile_free_file (libkrb5.so.3)
     #7  0x00007f2cb10ab983 profile_close_file (libkrb5.so.3)
     #8  0x00007f2cb10af249 profile_release (libkrb5.so.3)
     #9  0x00007f2cb10a06c7 k5_os_free_context (libkrb5.so.3)
     #10 0x00007f2cb1075a9a krb5_free_context (libkrb5.so.3)
     #11 0x000055cea7cb2dd1 kcm_data_destructor (sssd_kcm)
     #12 0x00007f2cac153e96 _tc_free_internal (libtalloc.so.2)
     #13 0x00007f2cac1537b0 _tc_free_internal (libtalloc.so.2)
     #14 0x00007f2cac1537b0 _tc_free_internal (libtalloc.so.2)
     #15 0x00007f2cac1537b0 _tc_free_internal (libtalloc.so.2)
     #16 0x00007f2cac1537b0 _tc_free_internal (libtalloc.so.2)
     #17 0x00007f2cac14e648 _talloc_free (libtalloc.so.2)
     #18 0x00007f2cac14c480 talloc_lib_fini (libtalloc.so.2)
     #19 0x00007f2cb151da96 _dl_fini (ld-linux-x86-64.so.2)
     #20 0x00007f2cab9226bc __run_exit_handlers (libc.so.6)
     #21 0x00007f2cab9227ec __GI_exit (libc.so.6)
     #22 0x00007f2cb030dc61 orderly_shutdown (libsss_util.so)
     #23 0x00007f2cac365a46 tevent_common_check_signal (libtevent.so.0)
     #24 0x00007f2cac367975 epoll_event_loop_once (libtevent.so.0)
     #25 0x00007f2cac365dab std_event_loop_once (libtevent.so.0)
     #26 0x00007f2cac362098 _tevent_loop_once (libtevent.so.0)
     #27 0x00007f2cac3622eb tevent_common_loop_wait (libtevent.so.0)
     #28 0x00007f2cac365d3b std_event_loop_wait (libtevent.so.0)
     #29 0x00007f2cb030eb37 server_loop (libsss_util.so)
     #30 0x000055cea7cb29f4 main (sssd_kcm)
     #31 0x00007f2cab90c1eb __libc_start_main (libc.so.6)
     #32 0x000055cea7cb2c7a _start (sssd_kcm)

We still only register one atexit handler instead of multiple ones
like in talloc 2.1.11, but avoids using a library destructor.

Bug #7587 seems to be fixed by not using talloc_autofree_context()
within samba.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13366

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>talloc: use a library destructor instead of atexit() if available</title>
<updated>2018-03-21T12:11:14+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2018-03-20T15:48:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=41b6810ba01f44537f470c806adb8686e1a39c48'/>
<id>41b6810ba01f44537f470c806adb8686e1a39c48</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7587

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7587

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
