<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc/malloc/Makefile, branch master</title>
<subtitle>Fork of glibc for development</subtitle>
<id>https://git.zx2c4.com/glibc/atom/malloc/Makefile?h=master</id>
<link rel='self' href='https://git.zx2c4.com/glibc/atom/malloc/Makefile?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/'/>
<updated>2024-06-20T08:32:16Z</updated>
<entry>
<title>malloc: Always install mtrace (bug 31892)</title>
<updated>2024-06-20T08:32:16Z</updated>
<author>
<name>Florian Weimer</name>
<email>fweimer@redhat.com</email>
</author>
<published>2024-06-20T08:32:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=086910fc41655152812b515dc324d2ac0dc36e67'/>
<id>urn:sha1:086910fc41655152812b515dc324d2ac0dc36e67</id>
<content type='text'>
Generation of the Perl script does not depend on Perl, so we can
always install it even if $(PERL) is not set during the build.

Change the malloc/mtrace.pl text substition not to rely on $(PERL).
Instead use PATH at run time to find the Perl interpreter. The Perl
interpreter cannot execute directly a script that starts with
“#! /bin/sh”: it always executes it with /bin/sh.  There is no
perl command line switch to disable this behavior.  Instead, use
the Perl require function to execute the script.  The additional
shift calls remove the “.” shell arguments.  Perl interprets the
“.” as a string concatenation operator, making the expression
syntactically valid.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>malloc: New test to check malloc alternate path using memory obstruction</title>
<updated>2024-06-04T16:00:29Z</updated>
<author>
<name>sayan paul</name>
<email>saypaul@redhat.com</email>
</author>
<published>2024-05-29T10:01:04Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=127fc56152347d73cb7c1c283e60e1cb1f15e9f9'/>
<id>urn:sha1:127fc56152347d73cb7c1c283e60e1cb1f15e9f9</id>
<content type='text'>
The test aims to ensure that malloc uses the alternate path to
allocate memory when sbrk() or brk() fails.To achieve this,
the test first creates an obstruction at current program break,
tests that obstruction with a failing sbrk(), then checks if malloc
is still returning a valid ptr thus inferring that malloc() used
mmap() instead of brk() or sbrk() to allocate the memory.
Reviewed-by: Arjun Shankar &lt;arjun@redhat.com&gt;
Reviewed-by: Zack Weinberg &lt;zack@owlfolio.org&gt;
</content>
</entry>
<entry>
<title>malloc: Improve aligned_alloc and calloc test coverage.</title>
<updated>2024-05-14T14:36:50Z</updated>
<author>
<name>Joe Simmons-Talbott</name>
<email>josimmon@redhat.com</email>
</author>
<published>2024-05-14T14:36:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=3395157ff2b0657d70c36169156f67440205c8bf'/>
<id>urn:sha1:3395157ff2b0657d70c36169156f67440205c8bf</id>
<content type='text'>
Add a DSO (malloc/tst-aligned_alloc-lib.so) that can be used during
testing to interpose malloc with a call that randomly uses either
aligned_alloc, __libc_malloc, or __libc_calloc in the place of malloc.
Use LD_PRELOAD with the DSO to mirror malloc/tst-malloc.c testing as an
example in malloc/tst-malloc-random.c.  Add malloc/tst-aligned-alloc-random.c
as another example that does a number of malloc calls with randomly sized,
but limited to 0xffff, requests.

The intention is to be able to utilize existing malloc testing to ensure
that similar allocation APIs are also exposed to the same rigors.

Reviewed-by: DJ Delorie &lt;dj@redhat.com&gt;
</content>
</entry>
<entry>
<title>malloc/Makefile: Split and sort tests</title>
<updated>2024-05-10T12:26:48Z</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2024-05-10T03:27:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=d49cd6a1913da9744b9a0ffbefb3f7958322382e'/>
<id>urn:sha1:d49cd6a1913da9744b9a0ffbefb3f7958322382e</id>
<content type='text'>
Put each test on a separate line and sort tests.

Signed-off-by: H.J. Lu &lt;hjl.tools@gmail.com&gt;
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>Update copyright dates with scripts/update-copyrights</title>
<updated>2024-01-01T18:53:40Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-01-01T18:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=dff8da6b3e89b986bb7f6b1ec18cf65d5972e307'/>
<id>urn:sha1:dff8da6b3e89b986bb7f6b1ec18cf65d5972e307</id>
<content type='text'>
</content>
</entry>
<entry>
<title>malloc: Fix tst-tcfree3 build csky-linux-gnuabiv2 with fortify source</title>
<updated>2023-10-23T16:34:04Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2023-10-23T16:33:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=83d13972f23546758b600ba940e0d53248dd0339'/>
<id>urn:sha1:83d13972f23546758b600ba940e0d53248dd0339</id>
<content type='text'>
With gcc 13.1 with --enable-fortify-source=2, tst-tcfree3 fails to
build on csky-linux-gnuabiv2 with:

../string/bits/string_fortified.h: In function ‘do_test’:
../string/bits/string_fortified.h:26:8: error: inlining failed in call
to ‘always_inline’ ‘memcpy’: target specific option mismatch
   26 | __NTH (memcpy (void *__restrict __dest, const void *__restrict
      __src,
      |        ^~~~~~
../misc/sys/cdefs.h:81:62: note: in definition of macro ‘__NTH’
   81 | #  define __NTH(fct)    __attribute__ ((__nothrow__ __LEAF)) fct
      |                                                              ^~~
tst-tcfree3.c:45:3: note: called from here
   45 |   memcpy (c, a, 32);
      |   ^~~~~~~~~~~~~~~~~

Instead of relying on -O0 to avoid malloc/free to be optimized away,
disable the builtin.

Reviewed-by: DJ Delorie &lt;dj@redhat.com&gt;
</content>
</entry>
<entry>
<title>malloc: Decrease resource usage for malloc tests</title>
<updated>2023-06-12T17:45:24Z</updated>
<author>
<name>Adhemerval Zanella Netto</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2023-06-07T17:39:55Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=94384bdf3955e59f508a6d927065fe0aa824d82b'/>
<id>urn:sha1:94384bdf3955e59f508a6d927065fe0aa824d82b</id>
<content type='text'>
The tst-mallocfork2 and tst-mallocfork3 create large number of
subprocesss, around 11k for former and 20k for latter, to check
for malloc async-signal-safeness on both fork and _Fork.  However
they do not really exercise allocation patterns different than
other tests fro malloc itself, and the spawned process just exit
without any extra computation.

The tst-malloc-tcache-leak is similar, but creates 100k threads
and already checks the resulting with mallinfo.

These tests are also very sensitive to system load (since they
estresss heavy the kernel resource allocation), and adding them
on THP tunable and mcheck tests increase the pressure even more.

For THP the fork tests do not add any more coverage than other
tests.  The mcheck is also not enable for tst-malloc-tcache-leak.

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>aligned_alloc: conform to C17</title>
<updated>2023-05-08T20:40:10Z</updated>
<author>
<name>DJ Delorie</name>
<email>dj@redhat.com</email>
</author>
<published>2023-03-21T04:46:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=d1417176a35d27ffb8da0ffb1e33154163b6eeb2'/>
<id>urn:sha1:d1417176a35d27ffb8da0ffb1e33154163b6eeb2</id>
<content type='text'>
This patch adds the strict checking for power-of-two alignments
in aligned_alloc(), and updates the manual accordingly.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>malloc: Really fix tst-memalign-3 link against threads</title>
<updated>2023-05-02T19:26:30Z</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2023-05-02T19:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=f2cabe04dc2630754e1583c56282920ea146c6d8'/>
<id>urn:sha1:f2cabe04dc2630754e1583c56282920ea146c6d8</id>
<content type='text'>
All the tst malloc variants need the thread linking flags.
</content>
</entry>
<entry>
<title>malloc: Fix tst-memalign-3 link against threads</title>
<updated>2023-05-02T19:08:10Z</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2023-05-02T19:07:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=c999c38f6fe3626a8e58df15aae929c5348724e1'/>
<id>urn:sha1:c999c38f6fe3626a8e58df15aae929c5348724e1</id>
<content type='text'>
</content>
</entry>
</feed>
