<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/lib/util/tests/tfork.c, branch talloc-2.4.4</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/util: Fix CID 1414760 - Memory leak</title>
<updated>2025-08-12T09:32:18+00:00</updated>
<author>
<name>Shweta Sodani</name>
<email>ssodani@redhat.com</email>
</author>
<published>2025-08-04T11:39:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=634dc83d5ca5a703865b17d87487d3923d41be43'/>
<id>634dc83d5ca5a703865b17d87487d3923d41be43</id>
<content type='text'>
local variable 't' is reusing in child process, resulting the leaking
the tfork object as a side effect.

This fixes coverity issue#1414760

Signed-off-by: Shweta Sodani &lt;ssodani@redhat.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Vinit Agnihotri &lt;vagnihot@redhat.com&gt;
Reviewed-by: Shachar Sharon &lt;ssharon@redhat.com&gt;

Autobuild-User(master): Anoop C S &lt;anoopcs@samba.org&gt;
Autobuild-Date(master): Tue Aug 12 09:32:19 UTC 2025 on atb-devel-224
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
local variable 't' is reusing in child process, resulting the leaking
the tfork object as a side effect.

This fixes coverity issue#1414760

Signed-off-by: Shweta Sodani &lt;ssodani@redhat.com&gt;
Reviewed-by: Anoop C S &lt;anoopcs@samba.org&gt;
Reviewed-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Vinit Agnihotri &lt;vagnihot@redhat.com&gt;
Reviewed-by: Shachar Sharon &lt;ssharon@redhat.com&gt;

Autobuild-User(master): Anoop C S &lt;anoopcs@samba.org&gt;
Autobuild-Date(master): Tue Aug 12 09:32:19 UTC 2025 on atb-devel-224
</pre>
</div>
</content>
</entry>
<entry>
<title>Spelling fixes s/avaiable/available/</title>
<updated>2019-09-01T22:21:26+00:00</updated>
<author>
<name>Mathieu Parent</name>
<email>math.parent@gmail.com</email>
</author>
<published>2019-08-29T19:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=dbd6bef29e6bc505d3e95a100759aca40bdfe1e5'/>
<id>dbd6bef29e6bc505d3e95a100759aca40bdfe1e5</id>
<content type='text'>
Signed-off-by: Mathieu Parent &lt;math.parent@gmail.com&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Mathieu Parent &lt;math.parent@gmail.com&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Spelling fixes s/hierachy/hierarchy/</title>
<updated>2019-09-01T22:21:26+00:00</updated>
<author>
<name>Mathieu Parent</name>
<email>math.parent@gmail.com</email>
</author>
<published>2019-08-29T19:50:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a59e0ec8955e51bb6d9ca62d2636388e417c1d45'/>
<id>a59e0ec8955e51bb6d9ca62d2636388e417c1d45</id>
<content type='text'>
Signed-off-by: Mathieu Parent &lt;math.parent@gmail.com&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Mathieu Parent &lt;math.parent@gmail.com&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tfork: Free memory in torture test to satisfy sanitizer</title>
<updated>2019-08-08T11:33:32+00:00</updated>
<author>
<name>Swen Schillig</name>
<email>swen@linux.ibm.com</email>
</author>
<published>2019-07-29T13:46:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=3bf915846f77d7df451728d115eaa25613532063'/>
<id>3bf915846f77d7df451728d115eaa25613532063</id>
<content type='text'>
Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Matthias Dieter Wallnöfer &lt;mdw@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Thu Aug  8 11:33:32 UTC 2019 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Swen Schillig &lt;swen@linux.ibm.com&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Matthias Dieter Wallnöfer &lt;mdw@samba.org&gt;

Autobuild-User(master): Andrew Bartlett &lt;abartlet@samba.org&gt;
Autobuild-Date(master): Thu Aug  8 11:33:32 UTC 2019 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:util: Fix tfork return value if sigprocmask fails</title>
<updated>2019-05-16T19:08:29+00:00</updated>
<author>
<name>Rikard Falkeborn</name>
<email>rikard.falkeborn@gmail.com</email>
</author>
<published>2019-05-09T19:17:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=749f1290ce654d2d47e84ff455212b008de6b54c'/>
<id>749f1290ce654d2d47e84ff455212b008de6b54c</id>
<content type='text'>
Returning a non-zero value from a function with bool as return value is
the same as returning true. Change the return value to false if
sigprocmask or pthread_sigmask fails to indicate failure.

Detected with the help of cppcheck.

Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Thu May 16 19:08:29 UTC 2019 on sn-devel-184
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Returning a non-zero value from a function with bool as return value is
the same as returning true. Change the return value to false if
sigprocmask or pthread_sigmask fails to indicate failure.

Detected with the help of cppcheck.

Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Andreas Schneider &lt;asn@samba.org&gt;

Autobuild-User(master): Andreas Schneider &lt;asn@cryptomilk.org&gt;
Autobuild-Date(master): Thu May 16 19:08:29 UTC 2019 on sn-devel-184
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:util: Use C99 initializer in tfork test</title>
<updated>2019-01-28T09:29:22+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2019-01-07T16:33:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=7983b03a89ece230c1702296b113702422f9b0f8'/>
<id>7983b03a89ece230c1702296b113702422f9b0f8</id>
<content type='text'>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Douglas Bagnall &lt;douglas.bagnall@catalyst.net.nz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tfork/test: ensure all threads start with SIGCHLD unblocked</title>
<updated>2018-11-28T11:59:27+00:00</updated>
<author>
<name>Ralph Boehme</name>
<email>slow@samba.org</email>
</author>
<published>2018-11-19T15:47:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f8e24596d53b41827135fc48d0603173265b41b1'/>
<id>f8e24596d53b41827135fc48d0603173265b41b1</id>
<content type='text'>
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Ralph Boehme &lt;slow@samba.org&gt;
Reviewed-by: Stefan Metzmacher &lt;metze@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib:util: Fix parameter aliasing in tfork test</title>
<updated>2018-05-17T15:30:09+00:00</updated>
<author>
<name>Andreas Schneider</name>
<email>asn@samba.org</email>
</author>
<published>2018-05-09T15:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=6f06a0154f5769cb85f6e189eecd78cd7805090a'/>
<id>6f06a0154f5769cb85f6e189eecd78cd7805090a</id>
<content type='text'>
../lib/util/tests/tfork.c:483:24: error: passing argument 1 to
    restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
   ret = pthread_create(&amp;threads[i],
                        ^~~~~~~~~~~
../lib/util/tests/tfork.c:486:10:
          (void *)&amp;threads[i]);
          ~~~~~~~~~~~~~~~~~~~

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Guenther Deschner &lt;gd@samba.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
../lib/util/tests/tfork.c:483:24: error: passing argument 1 to
    restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
   ret = pthread_create(&amp;threads[i],
                        ^~~~~~~~~~~
../lib/util/tests/tfork.c:486:10:
          (void *)&amp;threads[i]);
          ~~~~~~~~~~~~~~~~~~~

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

Signed-off-by: Andreas Schneider &lt;asn@samba.org&gt;
Reviewed-by: Guenther Deschner &lt;gd@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/util: remove unused '#include &lt;sys/syscall.h&gt;' from tests/tfork.c</title>
<updated>2018-04-03T14:41:09+00:00</updated>
<author>
<name>Stefan Metzmacher</name>
<email>metze@samba.org</email>
</author>
<published>2018-03-20T15:49:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=f2ff61ce9e8ab56d8a69fce29c9f214d5d98f89e'/>
<id>f2ff61ce9e8ab56d8a69fce29c9f214d5d98f89e</id>
<content type='text'>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13342

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=13342

Signed-off-by: Stefan Metzmacher &lt;metze@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests util/tfork: Tests for status and event fd</title>
<updated>2017-09-16T17:53:22+00:00</updated>
<author>
<name>Gary Lockyer</name>
<email>gary@catalyst.net.nz</email>
</author>
<published>2017-09-11T02:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=28edf7012b5fa474897055c8c1a4c438c69b8323'/>
<id>28edf7012b5fa474897055c8c1a4c438c69b8323</id>
<content type='text'>
Add tests to ensure that:
- The event_fd becomes readable once the worker process has terminated
- That the event_fd is not closed by the tfork code.
  - If this is done in tevent code and the event fde has not been
    freed, "Bad talloc magic value - " errors can result.
- That the status call does not block if the parent process launches
  more than one child process.
  - The status file descriptor for a child is passed to the
    subsequent children.  These processes hold the FD open, so that
    closing the fd does not make the read end go readable, and the
    process calling status blocks.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13037

Signed-off-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@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>
Add tests to ensure that:
- The event_fd becomes readable once the worker process has terminated
- That the event_fd is not closed by the tfork code.
  - If this is done in tevent code and the event fde has not been
    freed, "Bad talloc magic value - " errors can result.
- That the status call does not block if the parent process launches
  more than one child process.
  - The status file descriptor for a child is passed to the
    subsequent children.  These processes hold the FD open, so that
    closing the fd does not make the read end go readable, and the
    process calling status blocks.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13037

Signed-off-by: Gary Lockyer &lt;gary@catalyst.net.nz&gt;
Reviewed-by: Andrew Bartlett &lt;abartlet@samba.org&gt;
Reviewed-by: Ralph Boehme &lt;slow@samba.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
