<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src, branch v1.0.2</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>fix unhandled cases in strptime</title>
<updated>2014-05-20T21:58:25+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-05-20T02:14:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=ba9cb2e57d154fcfd8659dde987d4799380e3e9e'/>
<id>ba9cb2e57d154fcfd8659dde987d4799380e3e9e</id>
<content type='text'>
%C, %U, %W, and %y handling were completely missing; %C wrongly
fell-through to unrelated cases, and the rest returned failure. for
now, they all parse numbers in the proper forms and range-check the
values, but they do not store the value anywhere.

it's not clear to me whether, as "derived" fields, %U and %W should
produce any result. they certainly cannot produce a result unless the
year and weekday are also converted, but in this case it might be
desirable for them to do so. clarification is needed on the intended
behavior of strptime in cases like this.

%C and %y have well-defined behavior as long as they are used together
(and %y is defined by itself but may change in the future).
implementing them (including their correct interaction) is left as a
later change to be made.

finally, strptime now rejects unknown/invalid format characters
instead of ignoring them.

(cherry picked from commit dec66750b8ed4493d5bb40042f7a473e60fe934e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
%C, %U, %W, and %y handling were completely missing; %C wrongly
fell-through to unrelated cases, and the rest returned failure. for
now, they all parse numbers in the proper forms and range-check the
values, but they do not store the value anywhere.

it's not clear to me whether, as "derived" fields, %U and %W should
produce any result. they certainly cannot produce a result unless the
year and weekday are also converted, but in this case it might be
desirable for them to do so. clarification is needed on the intended
behavior of strptime in cases like this.

%C and %y have well-defined behavior as long as they are used together
(and %y is defined by itself but may change in the future).
implementing them (including their correct interaction) is left as a
later change to be made.

finally, strptime now rejects unknown/invalid format characters
instead of ignoring them.

(cherry picked from commit dec66750b8ed4493d5bb40042f7a473e60fe934e)
</pre>
</div>
</content>
</entry>
<entry>
<title>fix strftime %s not to zero pad with default width=2</title>
<updated>2014-05-20T21:58:25+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2014-05-08T17:04:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=45619f5c2309246ef9eac99f4ef01aea23f52ea7'/>
<id>45619f5c2309246ef9eac99f4ef01aea23f52ea7</id>
<content type='text'>
(cherry picked from commit ac0acd569e01735fc6052d43fdf57f3a07c93f3d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit ac0acd569e01735fc6052d43fdf57f3a07c93f3d)
</pre>
</div>
</content>
</entry>
<entry>
<title>remove useless __yield alias for sched_yield</title>
<updated>2014-05-20T21:58:24+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-05-04T17:15:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=3555f146a58789fe9c415f6cf396097e709deef9'/>
<id>3555f146a58789fe9c415f6cf396097e709deef9</id>
<content type='text'>
this is no longer used for anything, and reportedly clashed with a
builtin on certain compilers.

(cherry picked from commit adbf0258be4eea5f012e173de7e55a87f3093669)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this is no longer used for anything, and reportedly clashed with a
builtin on certain compilers.

(cherry picked from commit adbf0258be4eea5f012e173de7e55a87f3093669)
</pre>
</div>
</content>
</entry>
<entry>
<title>perform minimal sanity checks on zoneinfo files loaded via TZ variable</title>
<updated>2014-05-20T21:58:24+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-04-23T00:09:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=c7776e708e796587f8e264bd51a7ffe74422c26b'/>
<id>c7776e708e796587f8e264bd51a7ffe74422c26b</id>
<content type='text'>
previously, setting TZ to the pathname of a file which was not a valid
zoneinfo file would usually cause programs using local time zone based
operations to crash. the new code checks the file size and magic at
the beginning of the file, which seems sufficient to prevent
accidental misconfiguration from causing crashes. attempting to make
fully-robust validation would be futile unless we wanted to drop use
of mmap (shared zoneinfo) and instead read it into a local buffer,
since such validation would be subject to race conditions with
modification of the file.

(cherry picked from commit c3d9d172b1fcd56c4d356798f4e3b4653076bcc3)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
previously, setting TZ to the pathname of a file which was not a valid
zoneinfo file would usually cause programs using local time zone based
operations to crash. the new code checks the file size and magic at
the beginning of the file, which seems sufficient to prevent
accidental misconfiguration from causing crashes. attempting to make
fully-robust validation would be futile unless we wanted to drop use
of mmap (shared zoneinfo) and instead read it into a local buffer,
since such validation would be subject to race conditions with
modification of the file.

(cherry picked from commit c3d9d172b1fcd56c4d356798f4e3b4653076bcc3)
</pre>
</div>
</content>
</entry>
<entry>
<title>fix false negatives with periodic needles in strstr, wcsstr, and memmem</title>
<updated>2014-05-20T21:58:24+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-04-18T21:38:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e65bb40b30d4422f2d6ac2e1ae542e7879ddc13f'/>
<id>e65bb40b30d4422f2d6ac2e1ae542e7879ddc13f</id>
<content type='text'>
in cases where the memorized match range from the right factor
exceeded the length of the left factor, it was wrongly treated as a
mismatch rather than a match.

issue reported by Yves Bastide.

(cherry picked from commit 476cd1d96560aaf7f210319597556e7fbcd60469)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in cases where the memorized match range from the right factor
exceeded the length of the left factor, it was wrongly treated as a
mismatch rather than a match.

issue reported by Yves Bastide.

(cherry picked from commit 476cd1d96560aaf7f210319597556e7fbcd60469)
</pre>
</div>
</content>
</entry>
<entry>
<title>fix deadlock race in pthread_once</title>
<updated>2014-04-16T06:46:06+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-04-16T00:42:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=6ca7c837aa798cc610550b199d4db638605f17f2'/>
<id>6ca7c837aa798cc610550b199d4db638605f17f2</id>
<content type='text'>
at the end of successful pthread_once, there was a race window during
which another thread calling pthread_once would momentarily change the
state back from 2 (finished) to 1 (in-progress). in this case, the
status was immediately changed back, but with no wake call, meaning
that waiters which arrived during this short window could block
forever. there are two possible fixes. one would be adding the wake to
the code path where it was missing. but it's better just to avoid
reverting the status at all, by using compare-and-swap instead of
swap.

(cherry picked from commit 0d0c2f40344640a2a6942dda156509593f51db5d)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
at the end of successful pthread_once, there was a race window during
which another thread calling pthread_once would momentarily change the
state back from 2 (finished) to 1 (in-progress). in this case, the
status was immediately changed back, but with no wake call, meaning
that waiters which arrived during this short window could block
forever. there are two possible fixes. one would be adding the wake to
the code path where it was missing. but it's better just to avoid
reverting the status at all, by using compare-and-swap instead of
swap.

(cherry picked from commit 0d0c2f40344640a2a6942dda156509593f51db5d)
</pre>
</div>
</content>
</entry>
<entry>
<title>fix fallback code for old kernels in clock_gettime</title>
<updated>2014-04-16T06:46:05+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-04-15T03:48:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=0575c8f7ad2e67c362c14ae6c770e78744fc8246'/>
<id>0575c8f7ad2e67c362c14ae6c770e78744fc8246</id>
<content type='text'>
(cherry picked from commit 805698401dbac7ce3079fa97eaad5ba0508377f4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(cherry picked from commit 805698401dbac7ce3079fa97eaad5ba0508377f4)
</pre>
</div>
</content>
</entry>
<entry>
<title>use hidden visibility rather than protected for syscall internals</title>
<updated>2014-04-16T06:46:05+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2014-04-12T04:16:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f82b05c496b0597d35e437a15105ee796bc3a8d6'/>
<id>f82b05c496b0597d35e437a15105ee796bc3a8d6</id>
<content type='text'>
the use of visibility at all is purely an optimization to avoid the
need for the caller to load the GOT register or similar to prepare for
a call via the PLT. there is no reason for these symbols to be
externally visible, so hidden works just as well as protected, and
using protected visibility is undesirable due to toolchain bugs and
the lack of testing it receives.

in particular, GCC's microblaze target is known to generate symbolic
relocations in the GOT for functions with protected visibility. this
in turn results in a dynamic linker which crashes under any nontrivial
usage that requires making a syscall before symbolic relocations are
processed.

(cherry picked from commit 83c98aac4c43f9571e8f92a1c795afe02c237d4b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the use of visibility at all is purely an optimization to avoid the
need for the caller to load the GOT register or similar to prepare for
a call via the PLT. there is no reason for these symbols to be
externally visible, so hidden works just as well as protected, and
using protected visibility is undesirable due to toolchain bugs and
the lack of testing it receives.

in particular, GCC's microblaze target is known to generate symbolic
relocations in the GOT for functions with protected visibility. this
in turn results in a dynamic linker which crashes under any nontrivial
usage that requires making a syscall before symbolic relocations are
processed.

(cherry picked from commit 83c98aac4c43f9571e8f92a1c795afe02c237d4b)
</pre>
</div>
</content>
</entry>
<entry>
<title>math: fix aliasing violation in long double wrappers</title>
<updated>2014-04-16T06:46:05+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>nsz@port70.net</email>
</author>
<published>2014-04-11T15:57:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=67dc1f311646c50f3f1c281b7c345bb45401f17d'/>
<id>67dc1f311646c50f3f1c281b7c345bb45401f17d</id>
<content type='text'>
modfl and sincosl were passing long double* instead of double*
to the wrapped double precision functions (on archs where long
double and double have the same size).
This is fixed now by using temporaries (this is not optimized
to a single branch so the generated code is a bit bigger).
Found by Morten Welinder.

(cherry picked from commit 73c870ed3209b68b5c8c350534508cc9d95a6bcb)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
modfl and sincosl were passing long double* instead of double*
to the wrapped double precision functions (on archs where long
double and double have the same size).
This is fixed now by using temporaries (this is not optimized
to a single branch so the generated code is a bit bigger).
Found by Morten Welinder.

(cherry picked from commit 73c870ed3209b68b5c8c350534508cc9d95a6bcb)
</pre>
</div>
</content>
</entry>
<entry>
<title>fix search past the end of haystack in memmem</title>
<updated>2014-04-16T06:46:05+00:00</updated>
<author>
<name>Timo Teräs</name>
<email>timo.teras@iki.fi</email>
</author>
<published>2014-04-10T01:06:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=043865cadf1b26ee3a9ccdac3b0d0ca9d380cdad'/>
<id>043865cadf1b26ee3a9ccdac3b0d0ca9d380cdad</id>
<content type='text'>
to optimize the search, memchr is used to find the first occurrence of
the first character of the needle in the haystack before switching to
a search for the full needle. however, the number of characters
skipped by this first step were not subtracted from the haystack
length, causing memmem to search past the end of the haystack.

(cherry picked from commit 6fbdeff0e51f6afc38fbb1476a4db81322779da4)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to optimize the search, memchr is used to find the first occurrence of
the first character of the needle in the haystack before switching to
a search for the full needle. however, the number of characters
skipped by this first step were not subtracted from the haystack
length, causing memmem to search past the end of the haystack.

(cherry picked from commit 6fbdeff0e51f6afc38fbb1476a4db81322779da4)
</pre>
</div>
</content>
</entry>
</feed>
