<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nx-libs/nx-X11/lib/X11/XlibInt.c, branch 3.5.99.14</title>
<subtitle>NXv3 (redistributed) 
</subtitle>
<id>https://cgit.arctica-project.org/nx-libs/atom?h=3.5.99.14</id>
<link rel='self' href='https://cgit.arctica-project.org/nx-libs/atom?h=3.5.99.14'/>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/'/>
<updated>2017-08-25T08:06:49+00:00</updated>
<entry>
<title>Convert nx-X11/lib/ build flow from imake to autotools.</title>
<updated>2017-08-25T08:06:49+00:00</updated>
<author>
<name>Mike Gabriel</name>
<email>mike.gabriel@das-netzwerkteam.de</email>
</author>
<published>2017-07-21T10:31:09+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=c350873c7c977efe5210484f04160be45f84ba7e'/>
<id>urn:sha1:c350873c7c977efe5210484f04160be45f84ba7e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>_XDefaultError: set XlibDisplayIOError flag before calling exit</title>
<updated>2017-03-26T14:54:20+00:00</updated>
<author>
<name>Arthur Huillet</name>
<email>ahuillet@nvidia.com</email>
</author>
<published>2017-02-01T14:02:41+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=00405b278471b4b5aa65003eb7ae97ac17d56445'/>
<id>urn:sha1:00405b278471b4b5aa65003eb7ae97ac17d56445</id>
<content type='text'>
_XReply isn't reentrant, and it can lead to deadlocks when the default error
handler is called: _XDefaultError calls exit(1). It is called indirectly by
_XReply when a X protocol error comes in that isn't filtered/handled by an
extension or the application. This means that if the application (or one of its
loaded shared libraries such as the NVIDIA OpenGL driver) has registered any
_fini destructor, _fini will get called while still on the call stack of
_XReply. If the destructor interacts with the X server and calls _XReply, it
will hit a deadlock, looping on the following in _XReply:

    ConditionWait(dpy, dpy-&gt;xcb-&gt;reply_notify);

It is legal for an application to make Xlib calls during _fini, and that is
useful for an OpenGL driver to avoid resource leaks on the X server side, for
example in the dlopen/dlclose case. However, the driver can not readily tell
whether its _fini is being called because Xlib called exit, or for another
reason (dlclose), so it is hard to cleanly work around this issue in the driver.

This change makes it so _XReply effectively becomes a no-op when called after
_XDefaultError was called, as though an XIOError had happened. The dpy
connection isn't broken at that point, but any call to _XReply is going to hang.
This is a bit of a kludge, because the more correct solution would be to make
_XReply reentrant, maybe by broadcasting the reply_notify condition before
calling the default error handler. However, such a change would carry a grater
risk of introducing regressions in Xlib.

This change will drop some valid requests on the floor, but this should not
matter, as it will only do so in the case where the application is dying: X will
clean up after it once exit() is done running. There is the case of
XSetCloseDownMode(RETAIN_PERMANENT), but an application using that and wishing
to clean up resources in _fini would currently be hitting a deadlock, which is
hardly a better situation.

Signed-off-by: Aaron Plattner &lt;aplattner@nvidia.com&gt;
Reviewed-by: Jamey Sharp &lt;jamey@minilop.net&gt;
</content>
</entry>
<entry>
<title>drop platform support: unifdef QNX.</title>
<updated>2017-02-08T21:40:47+00:00</updated>
<author>
<name>Mike Gabriel</name>
<email>mike.gabriel@das-netzwerkteam.de</email>
</author>
<published>2016-11-15T20:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=c6250a86468b1c2c23d41b27c4d6e438518ec917'/>
<id>urn:sha1:c6250a86468b1c2c23d41b27c4d6e438518ec917</id>
<content type='text'>
 Relates to ArcticaProject/nx-libs#275.
</content>
</entry>
<entry>
<title>drop platform support: unifdef AIXV3, AIXV4 (and AIXrt, AIX386).</title>
<updated>2017-02-08T21:40:46+00:00</updated>
<author>
<name>Mike Gabriel</name>
<email>mike.gabriel@das-netzwerkteam.de</email>
</author>
<published>2016-11-15T20:20:22+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=4b178918ba19ebd9daa6f87fa790b6f6767b1f61'/>
<id>urn:sha1:4b178918ba19ebd9daa6f87fa790b6f6767b1f61</id>
<content type='text'>
 Fixes ArcticaProject/nx-libs#274.
</content>
</entry>
<entry>
<title>drop platform support: unifdef hpux and __hppa__.</title>
<updated>2017-02-08T21:40:46+00:00</updated>
<author>
<name>Mike Gabriel</name>
<email>mike.gabriel@das-netzwerkteam.de</email>
</author>
<published>2016-11-15T19:59:35+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=184c5d778210dea8eab045a5f7ecf9d4344c1c34'/>
<id>urn:sha1:184c5d778210dea8eab045a5f7ecf9d4344c1c34</id>
<content type='text'>
 Fixes ArcticaProject/nx-libs#273.
</content>
</entry>
<entry>
<title>drop platform support: unifdef __UNIXOS2__.</title>
<updated>2017-02-08T21:40:46+00:00</updated>
<author>
<name>Mike Gabriel</name>
<email>mike.gabriel@das-netzwerkteam.de</email>
</author>
<published>2016-11-15T17:41:52+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=d12f9524138899e43deb1a70fb37c97559d8f64e'/>
<id>urn:sha1:d12f9524138899e43deb1a70fb37c97559d8f64e</id>
<content type='text'>
 Fixes ArcticaProject/nx-libs#271.
</content>
</entry>
<entry>
<title>Fixes: warning: variable 'req' set but not,used</title>
<updated>2016-10-20T08:16:35+00:00</updated>
<author>
<name>walter harms</name>
<email>wharms@bfs.de</email>
</author>
<published>2016-06-04T15:19:59+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=ddc5ed4c9b876e2ae901edebcd59c9d77daeafd3'/>
<id>urn:sha1:ddc5ed4c9b876e2ae901edebcd59c9d77daeafd3</id>
<content type='text'>
Fixes: warning: variable 'req' set but not used [-Wunused-but-set-variable]
       by marking req _X_UNUSED
	Solution was discussed on xorg-devel ML
       Peter Hutter, Alan Coopersmith
        Re: [PATCH libX11 3/5] fix: warning: pointer targets in passing argument 2 of '_XSend' differ in signedness [-Wpointer-sign]

Signed-off-by: harms wharms@bfs.de
</content>
</entry>
<entry>
<title>Fix warnings in XlibInt.c</title>
<updated>2016-10-20T08:16:35+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2016-10-16T00:15:13+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=2c59fbe30b86854f32e80b84be18328a661e7707'/>
<id>urn:sha1:2c59fbe30b86854f32e80b84be18328a661e7707</id>
<content type='text'>
XlibInt.c: In function ‘_XIOError’:
XlibInt.c:3750:1: warning: ‘noreturn’ function does return [enabled by default]
 }

After fixing the above a new warning came up, which is also fixed now:

XlibInt.c: In function ‘_XIOError’:
XlibInt.c:3750:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
</content>
</entry>
<entry>
<title>Do not return() after exit().</title>
<updated>2016-10-19T19:40:29+00:00</updated>
<author>
<name>Thomas Klausner</name>
<email>wiz@NetBSD.org</email>
</author>
<published>2015-07-19T08:22:45+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=fc524ddbba875a5f091f13aaf5d851c7afb299f4'/>
<id>urn:sha1:fc524ddbba875a5f091f13aaf5d851c7afb299f4</id>
<content type='text'>
Signed-off-by: Thomas Klausner &lt;wiz@NetBSD.org&gt;
Reviewed-by: Alan Coopersmith &lt;alan.coopersmith@oracle.com&gt;
Backported-to-NX-by: Ulrich Sibiller &lt;uli42@gmx.de&gt;
</content>
</entry>
<entry>
<title>Remove redundant null checks before free</title>
<updated>2016-10-19T19:40:29+00:00</updated>
<author>
<name>walter harms</name>
<email>wharms@bfs.de</email>
</author>
<published>2014-06-05T16:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://cgit.arctica-project.org/nx-libs/commit/?id=fc26b97ea9053a2aba54824243282e27bc4a1e15'/>
<id>urn:sha1:fc26b97ea9053a2aba54824243282e27bc4a1e15</id>
<content type='text'>
This patch removes some redundant null checks before free.
It should not change the code otherwise. Be aware that this
is only the first series.

Signed-off-by: Harms &lt;wharms@bfs,de&gt;
Reviewed-by: Alan Coopersmith &lt;alan.coopersmith@oracle.com&gt;
Signed-off-by: Alan Coopersmith &lt;alan.coopersmith@oracle.com&gt;
Backported-to-NX-by: Ulrich Sibiller &lt;uli42@gmx.de&gt;
</content>
</entry>
</feed>
