musl - an implementation of the standard library for Linux-based systems
Go to file
Szabolcs Nagy ec1aed0a14 rewrite the regex pattern parser in regcomp
The new code is a bit simpler and the generated code is about 1KB
smaller (on i386). The basic design was kept including internal
interfaces, TNFA generation was not touched.

The old tre parser had various issues:

[^aa-z]
negated overlapping ranges in a bracket expression were handled
incorrectly (eg [^aa-z] was handled as [^a] instead of [^a-z])

a{,2}
missing lower bound in a counted repetition should be an error,
but it was accepted with broken semantics: a{,2} was treated as
a{0,3}, the new parser rejects it

a{999,}
large min count was not rejected (a{5000,} failed with REG_ESPACE
due to reaching a stack limit), the new parser enforces the
RE_DUP_MAX limit

\xff
regcomp used to accept a pattern with illegal sequences in it
(treated them as empty expression so p\xffq matched pq) the new
parser rejects such patterns with REG_BADPAT or REG_ERANGE

[^b-fD-H] with REG_ICASE
old parser turned this into [^b-fB-F] because of the negated
overlapping range issue (see above), the new parser treats it
as [^b-hB-H], POSIX seems to require [^d-fD-F], but practical
implementations do case-folding first and negate the character
set later instead of the other way around. (Supporting the posix
way efficiently would require significant changes so it was left
as is, it is unclear if any application actually expects the
posix behaviour, this issue is raised on the austingroup tracker:
http://austingroupbugs.net/view.php?id=872 ).

another case-insensitive matching issue is that unicode case
folding rules can group more than two characters together while
towupper and towlower can only work for a pair of upper and
lower case characters, this is a limitation of POSIX so it is
not fixed.

invalid bracket and brace expressions may return different error
codes now (REG_ERANGE instead of REG_EBRACK or REG_BADBR instead
of REG_EBRACE) otherwise the new parser should be compatible with
the old one.

regcomp should be able to handle arbitrary pattern input if the
pattern length is limited, the only exception is the use of large
repetition counts (eg. (a{255}){255}) which require exp amount
of memory and there is no easy workaround.
2014-09-13 00:20:55 +02:00
arch fix C++ incompatibility in i386 definition of max_align_t 2014-09-11 10:16:30 -04:00
crt add or1k (OpenRISC 1000) architecture port 2014-07-18 14:10:23 -04:00
dist add another example option to dist/config.mak 2012-04-24 16:49:11 -04:00
include add _DEFAULT_SOURCE feature profile as an alias for _BSD_SOURCE 2014-09-10 12:47:55 -04:00
lib new solution for empty lib dir (old one had some problems) 2011-02-17 17:12:52 -05:00
src rewrite the regex pattern parser in regcomp 2014-09-13 00:20:55 +02: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
COPYRIGHT update COPYRIGHT file to reflect new contributors 2014-07-31 16:06:11 -04:00
INSTALL update notice on broken gcc versions in INSTALL file 2014-07-31 19:02:54 -04:00
Makefile add tarball-producing targets to Makefile for ease of release 2014-06-25 16:14:37 -04:00
README update version reference in the README file 2014-06-25 14:16:53 -04:00
VERSION release 1.1.4 2014-07-31 19:10:31 -04:00
WHATSNEW release 1.1.4 2014-07-31 19:10:31 -04:00
configure add or1k (OpenRISC 1000) architecture port 2014-07-18 14:10:23 -04:00

README

    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/