Go to file
Rich Felker ba819787ee fix calloc when __simple_malloc implementation is used
previously, calloc's implementation encoded assumptions about the
implementation of malloc, accessing a size_t word just prior to the
allocated memory to determine if it was obtained by mmap to optimize
out the zero-filling. when __simple_malloc is used (static linking a
program with no realloc/free), it doesn't matter if the result of this
check is wrong, since all allocations are zero-initialized anyway. but
the access could be invalid if it crosses a page boundary or if the
pointer is not sufficiently aligned, which can happen for very small
allocations.

this patch fixes the issue by moving the zero-fill logic into malloc.c
with the full malloc, as a new function named __malloc0, which is
provided by a weak alias to __simple_malloc (which always gives
zero-filled memory) when the full malloc is not in use.
2015-06-22 18:50:09 +00:00
arch switch to using trap number 31 for syscalls on sh 2015-06-16 15:25:02 +00:00
crt add rcrt1 start file for fully static-linked PIE 2015-05-26 03:37:41 -04:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include byte-based C locale, phase 3: make MB_CUR_MAX variable to activate code 2015-06-16 06:18:00 +00:00
lib new solution for empty lib dir (old one had some problems) 2011-02-17 17:12:52 -05:00
src fix calloc when __simple_malloc implementation is used 2015-06-22 18:50:09 +00:00
tools fix system breakage window during make install due to permissions 2014-01-15 22:29:13 -05:00
.gitignore add version.h to .gitignore; it is a generated file 2014-01-21 01:06:42 -05:00
configure configure: work around compilers that merely warn for unknown options 2015-05-28 00:08:13 -04:00
COPYRIGHT update authors/contributors list 2015-03-16 18:43:54 -04:00
INSTALL update notice on broken gcc versions in INSTALL file 2014-07-31 19:02:54 -04:00
Makefile add additional Makefile dependency rules for rcrt1.o PIE start file 2015-06-03 02:02:09 -04:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.10 2015-06-04 16:08:24 -04:00
WHATSNEW release 1.1.10 2015-06-04 16:08:24 -04:00

    musl libc

musl, pronounced like the word "mussel", is an MIT-licensed
implementation of the standard C library targetting the Linux syscall
API, suitable for use in a wide range of deployment environments. musl
offers efficient static and dynamic linking support, lightweight code
and low runtime overhead, strong fail-safe guarantees under correct
usage, and correctness in the sense of standards conformance and
safety. musl is built on the principle that these goals are best
achieved through simple code that is easy to understand and maintain.

The 1.1 release series for musl features coverage for all interfaces
defined in ISO C99 and POSIX 2008 base, along with a number of
non-standardized interfaces for compatibility with Linux, BSD, and
glibc functionality.

For basic installation instructions, see the included INSTALL file.
Information on full musl-targeted compiler toolchains, system
bootstrapping, and Linux distributions built on musl can be found on
the project website:

    http://www.musl-libc.org/