<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/libexec/rtld-elf/xmalloc.c, branch upstream/11.2.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F11.2.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F11.2.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2014-02-22T11:06:48Z</updated>
<entry>
<title>Increase alignment to size of pointer if the alignment is too small.</title>
<updated>2014-02-22T11:06:48Z</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2014-02-22T11:06:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=eab68f795a5cfe398a635980176572357983e53e'/>
<id>urn:sha1:eab68f795a5cfe398a635980176572357983e53e</id>
<content type='text'>
Some modules do not align data at least to size of pointer, they uses a
smaller alignment, but our pointer should be aligned to its native
boundary, otherwise on some platforms, hardware alignment checking
will cause bus error.
</content>
</entry>
<entry>
<title>malloc_aligned() may not leave enough space for pointer to allocated memory,</title>
<updated>2014-02-21T03:36:16Z</updated>
<author>
<name>David Xu</name>
<email>davidxu@FreeBSD.org</email>
</author>
<published>2014-02-21T03:36:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=209782e06fd16c7330d789ff13502d5767a3a88f'/>
<id>urn:sha1:209782e06fd16c7330d789ff13502d5767a3a88f</id>
<content type='text'>
saving the pointer will overwrite bytes belongs to another memory block
unexpectly, to fix the problem, use (allocated address + sizeof(void *)) as
initial value, and slip to next aligned address, so maximum extra bytes is
sizeof(void *) + align - 1.

Tested by: Andre Albsmeier &lt; mail at ma17 dot ata dot myota dot orgndre &gt;
</content>
</entry>
<entry>
<title>Build an allocator for the aligned memory on top of the rtld-private</title>
<updated>2013-12-06T21:30:31Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2013-12-06T21:30:31Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=dfe296c43a26175f98ded41168e5c106edd52599'/>
<id>urn:sha1:dfe296c43a26175f98ded41168e5c106edd52599</id>
<content type='text'>
malloc.

Reviewed by:	kan
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
</content>
</entry>
<entry>
<title>Implement xstrdup() using strlen()/xmalloc()/memcpy() already</title>
<updated>2012-03-23T12:04:44Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2012-03-23T12:04:44Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f7b343037fb3ed739ca766e002944bef829bdf0e'/>
<id>urn:sha1:f7b343037fb3ed739ca766e002944bef829bdf0e</id>
<content type='text'>
presented in rtld, instead of pulling in libc strdup().

Submitted by:	   bde
MFC after:	   2 weeks
</content>
</entry>
<entry>
<title>Use xmalloc() instead of malloc() in the places where malloc() calls</title>
<updated>2012-03-22T14:20:51Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2012-03-22T14:20:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=758ffbfa3bd27cb793750d90c47ed8a0dc537823'/>
<id>urn:sha1:758ffbfa3bd27cb793750d90c47ed8a0dc537823</id>
<content type='text'>
are assumed to not fail.

Make the xcalloc() calling conventions follow the calloc(3) calling
conventions and replace unchecked calls to calloc() with calls to
xcalloc().

Remove redundand declarations from xmalloc.c, which are already
present in rtld.h.

Reviewed by:	kan
Discussed with:	bde
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Rtld links with the specially built pic static libc library to get some</title>
<updated>2011-08-24T20:05:13Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2011-08-24T20:05:13Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0e9a2605200b721fdfcf32d2c95f79a81fc84352'/>
<id>urn:sha1:0e9a2605200b721fdfcf32d2c95f79a81fc84352</id>
<content type='text'>
C runtime services, like printf(). Unfortunately, the multithread-safeness
measures in the libc do not work in rtld environment.

Rip the kernel printf() implementation and use it in the rtld instead of
libc version. This printf does not require any shared global data and thus
is mt-safe. Systematically use rtld_printf() and related functions, remove
the calls to err(3).

Note that stdio is still pulled from libc due to libmap implementaion using
fopen(). This is safe but unoptimal, and can be changed later.

Reported and tested by:	pgj
Diagnosed and reviewed by:	kan (previous version)
Approved by:	re (bz)
</content>
</entry>
<entry>
<title>Add function prototypes.</title>
<updated>2003-06-19T05:28:26Z</updated>
<author>
<name>Matthew N. Dodd</name>
<email>mdodd@FreeBSD.org</email>
</author>
<published>2003-06-19T05:28:26Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5407dd5b821a7700926705cd04fdd1b59fc88b11'/>
<id>urn:sha1:5407dd5b821a7700926705cd04fdd1b59fc88b11</id>
<content type='text'>
</content>
</entry>
<entry>
<title>$Id$ -&gt; $FreeBSD$</title>
<updated>1999-08-28T00:22:10Z</updated>
<author>
<name>Peter Wemm</name>
<email>peter@FreeBSD.org</email>
</author>
<published>1999-08-28T00:22:10Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=7f3dea244c40159a41ab22da77a434d7c5b5e85a'/>
<id>urn:sha1:7f3dea244c40159a41ab22da77a434d7c5b5e85a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Import the ELF dynamic linker.  This is the ElfKit version with</title>
<updated>1998-03-07T19:24:35Z</updated>
<author>
<name>John Polstra</name>
<email>jdp@FreeBSD.org</email>
</author>
<published>1998-03-07T19:24:35Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3124c3e09305ad80d1b67c11e4962dc5f6e7fb01'/>
<id>urn:sha1:3124c3e09305ad80d1b67c11e4962dc5f6e7fb01</id>
<content type='text'>
quite a few enhancements and bug fixes.  There are still some known
deficiencies, but it should be adequate to get us started with ELF.

Submitted by:	John Polstra &lt;jdp@polstra.com&gt;
</content>
</entry>
</feed>
