<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/src/thread, 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 pthread_cleanup_pop(1) crash in non-thread-capable, static-linked programs</title>
<updated>2012-02-28T15:13:35+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-02-28T15:13:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e3234d01094d9ed62e90c6d52a44601dce93a1bb'/>
<id>e3234d01094d9ed62e90c6d52a44601dce93a1bb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>work around "signal loses thread pointer" issue with "approach 2"</title>
<updated>2012-02-27T23:51:02+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-02-27T23:51:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=dac084a4c5f52bb3b121675320c47d3c3614174e'/>
<id>dac084a4c5f52bb3b121675320c47d3c3614174e</id>
<content type='text'>
this was discussed on the mailing list and no consensus on the
preferred solution was reached, so in anticipation of a release, i'm
just committing a minimally-invasive solution that avoids the problem
by ensuring that multi-threaded-capable programs will always have
initialized the thread pointer before any signal handler can run.

in the long term we may switch to initializing the thread pointer at
program start time whenever the program has the potential to access
any per-thread data.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this was discussed on the mailing list and no consensus on the
preferred solution was reached, so in anticipation of a release, i'm
just committing a minimally-invasive solution that avoids the problem
by ensuring that multi-threaded-capable programs will always have
initialized the thread pointer before any signal handler can run.

in the long term we may switch to initializing the thread pointer at
program start time whenever the program has the potential to access
any per-thread data.
</pre>
</div>
</content>
</entry>
<entry>
<title>small fix for new pthread cleanup stuff</title>
<updated>2012-02-10T02:24:56+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-02-10T02:24:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2230218c283af7fbff08167685f17dad8d748f14'/>
<id>2230218c283af7fbff08167685f17dad8d748f14</id>
<content type='text'>
even if pthread_create/exit code is not linked, run flag needs to be
checked and cleanup function potentially run on pop. thus, move the
code to the module that's always linked when pthread_cleanup_push/pop
is used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
even if pthread_create/exit code is not linked, run flag needs to be
checked and cleanup function potentially run on pop. thus, move the
code to the module that's always linked when pthread_cleanup_push/pop
is used.
</pre>
</div>
</content>
</entry>
<entry>
<title>replace bad cancellation cleanup abi with a sane one</title>
<updated>2012-02-09T07:33:08+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-02-09T07:33:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=afc35d5efde48b82a7786d9c89b115965da6b637'/>
<id>afc35d5efde48b82a7786d9c89b115965da6b637</id>
<content type='text'>
the old abi was intended to duplicate glibc's abi at the expense of
being ugly and slow, but it turns out glib was not even using that abi
except on non-gcc-compatible compilers (which it doesn't even support)
and was instead using an exceptions-in-c/unwind-based approach whose
abi we could not duplicate anyway without nasty dwarf2/unwind
integration.

the new abi is copied from a very old glibc abi, which seems to still
be supported/present in current glibc. it avoids all unwinding,
whether by sjlj or exceptions, and merely maintains a linked list of
cleanup functions to be called from the context of pthread_exit. i've
made some care to ensure that longjmp out of a cleanup function should
work, even though it is not required to.

this change breaks abi compatibility with programs which were using
pthread cancellation, which is unfortunate, but that's why i'm making
the change now rather than later. considering that most pthread
features have not been usable until recently anyway, i don't see it as
a major issue at this point.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the old abi was intended to duplicate glibc's abi at the expense of
being ugly and slow, but it turns out glib was not even using that abi
except on non-gcc-compatible compilers (which it doesn't even support)
and was instead using an exceptions-in-c/unwind-based approach whose
abi we could not duplicate anyway without nasty dwarf2/unwind
integration.

the new abi is copied from a very old glibc abi, which seems to still
be supported/present in current glibc. it avoids all unwinding,
whether by sjlj or exceptions, and merely maintains a linked list of
cleanup functions to be called from the context of pthread_exit. i've
made some care to ensure that longjmp out of a cleanup function should
work, even though it is not required to.

this change breaks abi compatibility with programs which were using
pthread cancellation, which is unfortunate, but that's why i'm making
the change now rather than later. considering that most pthread
features have not been usable until recently anyway, i don't see it as
a major issue at this point.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix cancellation failure in single-threaded programs</title>
<updated>2012-01-22T22:19:37+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2012-01-22T22:19:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=ce7d72596c57386c493969cc56546c7aba2e1049'/>
<id>ce7d72596c57386c493969cc56546c7aba2e1049</id>
<content type='text'>
even a single-threaded program can be cancellable, e.g. if it's called
pthread_cancel(pthread_self()). the correct predicate to check is not
whether multiple threads have been invoked, but whether pthread_self
has been invoked.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
even a single-threaded program can be cancellable, e.g. if it's called
pthread_cancel(pthread_self()). the correct predicate to check is not
whether multiple threads have been invoked, but whether pthread_self
has been invoked.
</pre>
</div>
</content>
</entry>
<entry>
<title>report sem value overflows in sem_post</title>
<updated>2011-10-26T04:28:47+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-10-26T04:28:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=26120950e26478740a29fd0b1fd78a0bd6b880c8'/>
<id>26120950e26478740a29fd0b1fd78a0bd6b880c8</id>
<content type='text'>
this is not required by the standard, but it's nicer than corrupting
the state and rather inexpensive.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this is not required by the standard, but it's nicer than corrupting
the state and rather inexpensive.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix typo in arm clone() asm</title>
<updated>2011-10-09T04:02:39+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-10-09T04:02:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2b89e56c94c1ce4369a3c7a17304df17df1fa822'/>
<id>2b89e56c94c1ce4369a3c7a17304df17df1fa822</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>recovering ownerdead robust mutex must reset recursive lock count</title>
<updated>2011-10-03T04:27:47+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-10-03T04:27:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=5e977e8b48c6862767ea0a1255233600957c05db'/>
<id>5e977e8b48c6862767ea0a1255233600957c05db</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>simplify robust mutex unlock code path</title>
<updated>2011-10-03T04:19:05+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-10-03T04:19:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=b6f9974ad843b6b106db082fc44e710c0eb06e3b'/>
<id>b6f9974ad843b6b106db082fc44e710c0eb06e3b</id>
<content type='text'>
right now it's questionable whether this change is an improvement or
not, but if we later want to support priority inheritance mutexes, it
will be important to have the code paths unified like this to avoid
major code duplication.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
right now it's questionable whether this change is an improvement or
not, but if we later want to support priority inheritance mutexes, it
will be important to have the code paths unified like this to avoid
major code duplication.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix crash if pthread_mutex_unlock is called without ever locking</title>
<updated>2011-10-03T04:11:16+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2011-10-03T04:11:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=b8688ff87574fad6b3056443a5385010952fb243'/>
<id>b8688ff87574fad6b3056443a5385010952fb243</id>
<content type='text'>
this is valid for error-checking mutexes; otherwise it invokes UB and
would be justified in crashing.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this is valid for error-checking mutexes; otherwise it invokes UB and
would be justified in crashing.
</pre>
</div>
</content>
</entry>
</feed>
