<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc/malloc/Versions, branch master</title>
<subtitle>Fork of glibc for development</subtitle>
<id>https://git.zx2c4.com/glibc/atom/malloc/Versions?h=master</id>
<link rel='self' href='https://git.zx2c4.com/glibc/atom/malloc/Versions?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/'/>
<updated>2022-10-28T17:43:58Z</updated>
<entry>
<title>Remove unused scratch_buffer_dupfree</title>
<updated>2022-10-28T17:43:58Z</updated>
<author>
<name>Szabolcs Nagy</name>
<email>szabolcs.nagy@arm.com</email>
</author>
<published>2022-10-11T12:23:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=8c77e26ba8b360c851b2b9485bb4431aacc51ad1'/>
<id>urn:sha1:8c77e26ba8b360c851b2b9485bb4431aacc51ad1</id>
<content type='text'>
Turns out scratch_buffer_dupfree internal API was unused since

commit ef0700004bf0dccf493a5e8e21f71d9e7972ea9f
stdlib: Simplify buffer management in canonicalize

And the related test in malloc/tst-scratch_buffer had issues
so it's better to remove it completely.

Reviewed-by: Florian Weimer &lt;fweimer@redhat.com&gt;
</content>
</entry>
<entry>
<title>Move malloc_{g,s}et_state to libc_malloc_debug</title>
<updated>2021-07-22T13:08:10Z</updated>
<author>
<name>Siddhesh Poyarekar</name>
<email>siddhesh@sourceware.org</email>
</author>
<published>2021-07-22T13:08:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=0552fd2c7d4e8a570cb4fe4dfe65e96f6d24b0cd'/>
<id>urn:sha1:0552fd2c7d4e8a570cb4fe4dfe65e96f6d24b0cd</id>
<content type='text'>
These deprecated functions are only safe to call from
__malloc_initialize_hook and as a result, are not useful in the
general case.  Move the implementations to libc_malloc_debug so that
existing binaries that need it will now have to preload the debug DSO
to work correctly.

This also allows simplification of the core malloc implementation by
dropping all the undumping support code that was added to make
malloc_set_state work.

One known breakage is that of ancient emacs binaries that depend on
this.  They will now crash when running with this libc.  With
LD_BIND_NOW=1, it will terminate immediately because of not being able
to find malloc_set_state but with lazy binding it will crash in
unpredictable ways.  It will need a preloaded libc_malloc_debug.so so
that its initialization hook is executed to allow its malloc
implementation to work properly.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>glibc.malloc.check: Wean away from malloc hooks</title>
<updated>2021-07-22T13:08:08Z</updated>
<author>
<name>Siddhesh Poyarekar</name>
<email>siddhesh@sourceware.org</email>
</author>
<published>2021-07-22T13:08:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=b5bd5bfe88f496463ec9fab680a8edf64d7c2a42'/>
<id>urn:sha1:b5bd5bfe88f496463ec9fab680a8edf64d7c2a42</id>
<content type='text'>
The malloc-check debugging feature is tightly integrated into glibc
malloc, so thanks to an idea from Florian Weimer, much of the malloc
implementation has been moved into libc_malloc_debug.so to support
malloc-check.  Due to this, glibc malloc and malloc-check can no
longer work together; they use altogether different (but identical)
structures for heap management.  This should not make a difference
though since the malloc check hook is not disabled anywhere.
malloc_set_state does, but it does so early enough that it shouldn't
cause any problems.

The malloc check tunable is now in the debug DSO and has no effect
when the DSO is not preloaded.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>mtrace: Wean away from malloc hooks</title>
<updated>2021-07-22T13:08:06Z</updated>
<author>
<name>Siddhesh Poyarekar</name>
<email>siddhesh@sourceware.org</email>
</author>
<published>2021-07-22T13:08:06Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=9dad716d4d2993f50b165747781244bd7c43bc95'/>
<id>urn:sha1:9dad716d4d2993f50b165747781244bd7c43bc95</id>
<content type='text'>
Wean mtrace away from the malloc hooks and move them into the debug
DSO.  Split the API away from the implementation so that we can add
the API to libc.so as well as libc_malloc_debug.so, with the libc
implementations being empty.

Update localplt data since memalign no longer has any callers after
this change.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>mcheck: Wean away from malloc hooks [BZ #23489]</title>
<updated>2021-07-22T13:08:02Z</updated>
<author>
<name>Siddhesh Poyarekar</name>
<email>siddhesh@sourceware.org</email>
</author>
<published>2021-07-22T13:08:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=c142eb253f3814f46527e9b37484041dd85702cf'/>
<id>urn:sha1:c142eb253f3814f46527e9b37484041dd85702cf</id>
<content type='text'>
Split the mcheck implementation into the debugging hooks and API so
that the API can be replicated in libc and libc_malloc_debug.so.  The
libc APIs always result in failure.

The mcheck implementation has also been moved entirely into
libc_malloc_debug.so and with it, all of the hook initialization code
can now be moved into the debug library.  Now the initialization can
be done independently of libc internals.

With this patch, libc_malloc_debug.so can no longer be used with older
libcs, which is not its goal anyway.  tst-vfork3 breaks due to this
since it spawns shell scripts, which in turn execute using the system
glibc.  Move the test to tests-container so that only the built glibc
is used.

This move also fixes bugs in the mcheck version of memalign and
realloc, thus allowing removal of the tests from tests-mcheck
exclusion list.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>Move malloc hooks into a compat DSO</title>
<updated>2021-07-22T13:07:59Z</updated>
<author>
<name>Siddhesh Poyarekar</name>
<email>siddhesh@sourceware.org</email>
</author>
<published>2021-07-22T13:07:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=2d2d9f2b48a943fa556301db532103d09800da4d'/>
<id>urn:sha1:2d2d9f2b48a943fa556301db532103d09800da4d</id>
<content type='text'>
Remove all malloc hook uses from core malloc functions and move it
into a new library libc_malloc_debug.so.  With this, the hooks now no
longer have any effect on the core library.

libc_malloc_debug.so is a malloc interposer that needs to be preloaded
to get hooks functionality back so that the debugging features that
depend on the hooks, i.e. malloc-check, mcheck and mtrace work again.
Without the preloaded DSO these debugging features will be nops.
These features will be ported away from hooks in subsequent patches.

Similarly, legacy applications that need hooks functionality need to
preload libc_malloc_debug.so.

The symbols exported by libc_malloc_debug.so are maintained at exactly
the same version as libc.so.

Finally, static binaries will no longer be able to use malloc
debugging features since they cannot preload the debugging DSO.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
Tested-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>Move mcheck symbol from stdlib to malloc</title>
<updated>2021-07-08T13:17:21Z</updated>
<author>
<name>Siddhesh Poyarekar</name>
<email>siddhesh@sourceware.org</email>
</author>
<published>2021-07-07T13:44:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=b8a19968b0ad928772ab282133a9374d135f7438'/>
<id>urn:sha1:b8a19968b0ad928772ab282133a9374d135f7438</id>
<content type='text'>
It is defined in malloc, so it belongs there.  Verified on x86_64 that
the built libraries are identical despite this change.
</content>
</entry>
<entry>
<title>malloc: Drop __malloc_initialized from Versions</title>
<updated>2021-06-22T14:44:31Z</updated>
<author>
<name>Siddhesh Poyarekar</name>
<email>siddhesh@sourceware.org</email>
</author>
<published>2021-06-22T14:43:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=a318262bc0081ab83e3f3c90e50462f99148605e'/>
<id>urn:sha1:a318262bc0081ab83e3f3c90e50462f99148605e</id>
<content type='text'>
__malloc_initialized is mentioned in Versions when it is actually an
internal symbol.  The resultant binaries are identical.
</content>
</entry>
<entry>
<title>malloc: Add scratch_buffer_dupfree</title>
<updated>2021-01-05T14:33:16Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2020-12-28T12:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=448a256359e951fd2e81ccb2926e3f2b1d7a09de'/>
<id>urn:sha1:448a256359e951fd2e81ccb2926e3f2b1d7a09de</id>
<content type='text'>
It returns a copy of the buffer up to a defined size.  It will be used
on realpath sync with gnulib.
</content>
</entry>
<entry>
<title>Update mallinfo2 ABI, and test</title>
<updated>2020-09-17T22:49:30Z</updated>
<author>
<name>DJ Delorie</name>
<email>dj@redhat.com</email>
</author>
<published>2020-09-01T20:17:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=cdf645427d176197b82f44308a5e131d69fb53ad'/>
<id>urn:sha1:cdf645427d176197b82f44308a5e131d69fb53ad</id>
<content type='text'>
This patch adds the ABI-related bits to reflect the new mallinfo2
function, and adds a test case to verify basic functionality.

Reviewed-by: Adhemerval Zanella &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
</feed>
