<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/stdio, branch v0.8.7</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 scanf handling of "0" (followed by immediate EOF) with "%x"</title>
<updated>2012-03-13T16:37:51+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-03-13T16:37:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=291f839a440423a15487ba95822247adb2b098f6'/>
<id>291f839a440423a15487ba95822247adb2b098f6</id>
<content type='text'>
other cases with %x were probably broken too.

I would actually like to go ahead and replace this code in scanf with
calls to the new __intparse framework, but for now this calls for a
quick and unobtrusive fix without the risk of breaking other things.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
other cases with %x were probably broken too.

I would actually like to go ahead and replace this code in scanf with
calls to the new __intparse framework, but for now this calls for a
quick and unobtrusive fix without the risk of breaking other things.
</pre>
</div>
</content>
</entry>
<entry>
<title>make stdio open, read, and write operations cancellation points</title>
<updated>2012-02-02T05:11:29+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-02-02T05:11:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=58165923890865a6ac042fafce13f440ee986fd9'/>
<id>58165923890865a6ac042fafce13f440ee986fd9</id>
<content type='text'>
it should be noted that only the actual underlying buffer flush and
fill operations are cancellable, not reads from or writes to the
buffer. this behavior is compatible with POSIX, which makes all
cancellation points in stdio optional, and it achieves the goal of
allowing cancellation of a thread that's "stuck" on IO (due to a
non-responsive socket/pipe peer, slow/stuck hardware, etc.) without
imposing any measurable performance cost.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
it should be noted that only the actual underlying buffer flush and
fill operations are cancellable, not reads from or writes to the
buffer. this behavior is compatible with POSIX, which makes all
cancellation points in stdio optional, and it achieves the goal of
allowing cancellation of a thread that's "stuck" on IO (due to a
non-responsive socket/pipe peer, slow/stuck hardware, etc.) without
imposing any measurable performance cost.
</pre>
</div>
</content>
</entry>
<entry>
<title>simplify atexit and fflush-on-exit handling</title>
<updated>2011-10-15T03:00:24+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-10-15T03:00:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f753049a50132a23849ef89a8af5ff86ad595c25'/>
<id>f753049a50132a23849ef89a8af5ff86ad595c25</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>don't crash on null strings in printf</title>
<updated>2011-09-29T02:07:58+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-09-29T02:07:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5f814682b48c59f07568d349f979eed4cf306703'/>
<id>5f814682b48c59f07568d349f979eed4cf306703</id>
<content type='text'>
passing null pointer for %s is UB but lots of broken programs do it anyway
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
passing null pointer for %s is UB but lots of broken programs do it anyway
</pre>
</div>
</content>
</entry>
<entry>
<title>avoid setting FILE lock count when not using flockfile</title>
<updated>2011-09-22T01:30:45+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-09-22T01:30:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=ca52e347673126956a4f21247d8a551ea668f61f'/>
<id>ca52e347673126956a4f21247d8a551ea668f61f</id>
<content type='text'>
for now this is just a tiny optimization, but later if we support
cancellation from __stdio_read and __stdio_write, it will be necessary
for the recusrive lock count to be zero in order for these functions
to know they are responsible for unlocking the FILE on cancellation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
for now this is just a tiny optimization, but later if we support
cancellation from __stdio_read and __stdio_write, it will be necessary
for the recusrive lock count to be zero in order for these functions
to know they are responsible for unlocking the FILE on cancellation.
</pre>
</div>
</content>
</entry>
<entry>
<title>more fmemopen null termination fixes</title>
<updated>2011-09-05T01:53:20+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-09-05T01:53:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=d2e061a2bd3f7674cfef2e2217e0695419041b5e'/>
<id>d2e061a2bd3f7674cfef2e2217e0695419041b5e</id>
<content type='text'>
null termination is only added when current size grows.
in update modes, null termination is not added if it does not fit
(i.e. it is not allowed to clobber data).

these rules make very little sense, but that's how it goes..
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
null termination is only added when current size grows.
in update modes, null termination is not added if it does not fit
(i.e. it is not allowed to clobber data).

these rules make very little sense, but that's how it goes..
</pre>
</div>
</content>
</entry>
<entry>
<title>fix some fmemopen behaviors</title>
<updated>2011-09-05T01:40:42+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-09-05T01:40:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e72ee5786b1f328da131b87388333c2e3a09b7b3'/>
<id>e72ee5786b1f328da131b87388333c2e3a09b7b3</id>
<content type='text'>
read should not be allowed past "current size".
append mode should write at "current size", not buffer size.
null termination should not be written except when "current size" grows.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
read should not be allowed past "current size".
append mode should write at "current size", not buffer size.
null termination should not be written except when "current size" grows.
</pre>
</div>
</content>
</entry>
<entry>
<title>fmemopen: fix eof handling, hopefully right this time</title>
<updated>2011-09-04T20:06:38+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-09-04T20:06:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=22e4542348352235614b57948025bdd0cc30dc32'/>
<id>22e4542348352235614b57948025bdd0cc30dc32</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fmemopen fixes</title>
<updated>2011-09-04T20:04:28+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-09-04T20:04:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f81279ff583ef81bc88a46dd1d0140fb6e0ed222'/>
<id>f81279ff583ef81bc88a46dd1d0140fb6e0ed222</id>
<content type='text'>
disallow seek past end of buffer (per posix)
fix position accounting to include data buffered for read
don't set eof flag when no data was requested
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
disallow seek past end of buffer (per posix)
fix position accounting to include data buffered for read
don't set eof flag when no data was requested
</pre>
</div>
</content>
</entry>
<entry>
<title>memstreams: fix incorrect handling of file pos &gt; current size</title>
<updated>2011-09-04T14:29:04+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-09-04T14:29:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=7ee3dcb3c603b20fcd4547ffb00e11701c6d1cf4'/>
<id>7ee3dcb3c603b20fcd4547ffb00e11701c6d1cf4</id>
<content type='text'>
the addition is safe and cannot overflow because both operands are
positive when considered as signed quantities.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the addition is safe and cannot overflow because both operands are
positive when considered as signed quantities.
</pre>
</div>
</content>
</entry>
</feed>
