| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_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->xcb->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 <aplattner@nvidia.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
'ch' gets moved inside the allocated buffer as we're looping through
fonts, so keep a reference to the start of the buffer so we can pass
that to Xfree in the failure case.
Fixes: commit 20a3f99eba5001925b8b313da3accb7900eb1927 "Plug a memory leak"
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
| |
- Support for i18n in libNX_X11 is static only, has ever been.
- Thus, the files XlcSL.[co], XlcDL.[co], XDefaultIMIF.[co],
XDefaultOMIF.[co] and lcDynamic.[co] become obsolete.
|
| |
|
|
|
|
| |
8bit_tab_to_h.c and cjk_tab_to_h.c to nx-libs's doc/ folder.
|
|
|
|
| |
Relates to ArcticaProject/nx-libs#275.
|
|
|
|
| |
Relates to ArcticaProject/nx-libs#275.
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#288.
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#274.
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#273.
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#272.
|
|
|
|
| |
Fixes ArcticaProject/nx-libs#271.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Creating libX11 symlinks breaks our builds in clean environments. Drop this
feature for now.
It must be rewritten to only create the symlinks after everything has been
built.
|
|
|
|
|
|
| |
warning: "XTRANS_SEND_FDS" is not defined [-Wundef]
This define came in via the recent xtrans update.
|
| |
|
| |
|
| |
|
|
|
|
| |
just as Xorg upstream did
|
|
|
|
| |
although upstream still includes it.
|
| |
|
|
|
|
| |
never used
|
|
|
|
|
|
|
|
|
|
| |
Create libX11* link in exports/lib. This simplifies running nxagent
from the build directory.
This also adds a clean rule to remove the libX11 links as well as the
libNX_X11 links which was not done before.
Fixes ArcticaProject/nx-libs#234
|
| |
|
|
|
|
|
|
| |
of X.org and XFree86.
Fixes ArcticaProject/nx-libs#250.
|
|
|
|
|
|
|
|
| |
This was introduced in 8ea762f.
Reported-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Emilio Pozuelo Monfort <pochu@debian.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
|
|
|
| |
LRGB.c: In function ‘LINEAR_RGB_InitSCCData’:
LRGB.c:798:1: warning: label ‘FreeBlueTblElements’ defined but not used [-Wunused-label]
FreeBlueTblElements:
^
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
signedness [-Wpointer-sign]
fix signess warning by casting
Signed-off-by: walter harms <wharms@bfs.de>
|
|
|
|
|
|
| |
simplify code
Signed-off-by: walter harms <wharms@bfs.de>
|
|
|
|
|
|
| |
remove stray extern
Signed-off-by: walter harms <wharms@bfs.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
}
|
|
|
|
|
|
|
|
|
| |
imLcIm.c: In function ‘_XimCreateDefaultTree’:
imLcIm.c:525:11: warning: unused variable ‘cachedir’ [-Wunused-variable]
char *cachedir = NULL;
^
imLcIm.c:521:35: warning: variable ‘intname’ set but not used [-Wunused-but-set-variable]
char *name, *tmpname = NULL, *intname;
|
|
|
|
|
|
|
| |
Pending.c: In function ‘XEventsQueued’:
Pending.c:44:5: warning: format ‘%p’ expects argument of type ‘void *’, but argument 3 has type ‘struct Display *’ [-Wformat=]
fprintf(stderr, "\nXEventsQueued: Called with a display at [%p].\n", dpy);
^
|
|
|
|
|
|
|
|
| |
all _X11Trans* functions lead to a warnign like this:
implicit declaration of function ‘_X11TransOpenCOTSClient’ [-Wimplicit-function-declaration]
Fix it by partly reverting d3ae0b2c9559e70448746240caaf5634c78d0eef (which removed too much)
|
|
|
|
| |
never was needed in nx-X11.
|
|
|
|
|
|
|
|
|
|
| |
Check if enough bytes were received for specified image type and
geometry. Otherwise GetPixel and other functions could trigger an
out of boundary read later on.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
| |
v2: FontNames.c return a NULL list whenever a single
length field from the server is incohent.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
instead of converting to int and back
Fixes clang warnings of the form:
HVC.c:190:43: warning: implicit conversion changes signedness: 'int' to
'unsigned long' [-Wsign-conversion]
if (strncmp(spec, _XcmsTekHVC_prefix, n) != 0) {
~~~~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clears many gcc warnings of the form:
uvY.c: In function ‘XcmsCIEuvYToCIEXYZ’:
uvY.c:263:19: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
for (i = 0; i < nColors; i++, pColor++) {
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes gcc warnings of the form:
IdOfPr.c: In function ‘XcmsFormatOfPrefix’:
IdOfPr.c:69:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ((len = strlen(prefix)) >= sizeof(string_buf)) {
^
IdOfPr.c:83:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len >= sizeof(string_buf)) Xfree(string_lowered);
^
IdOfPr.c:97:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len >= sizeof(string_buf)) Xfree(string_lowered);
^
IdOfPr.c:104:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (len >= sizeof(string_buf)) Xfree(string_lowered);
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The basic rule "put parantheses around macro parameters" should be
observed where possible. Otherwise code like
ConnectionNumber(foo = bar);
fails to compile. (It obviously passes if ConnectionNumber is a C
function.) There are several other macros amended for the same reason.
This bug appeared while building http://ioccc.org/1993/cmills.c, so
historically it was not present.
Signed-off-by: Dominik Muth <muth@nxdomain.no-ip.biz>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
XkbGetKeyboardByName relies on flags to read the data from the server.
If the X server sends us the wrong flags or if a subreply is smaller
than it should be, XkbGetKeyboardByName will not read all the available
data and leave data in the buffer, which will cause the next _XReply()
to fail with:
[xcb] Extra reply data still left in queue
[xcb] This is most likely caused by a broken X extension library
[xcb] Aborting, sorry about that.
xcb_io.c:576: _XReply: Assertion `!xcb_xlib_extra_reply_data_left' failed.
Aborted
Check if there is some extra data left at the end of
XkbGetKeyboardByName() and discard that data if any is found.
Many thanks to Peter Hutterer <peter.hutterer@who-t.net> for finding the
root cause of the issue and Adam Jackson <ajax@redhat.com> for helping
with the analysis!
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
| |
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Don't need to test for a case that we already returned for, don't need
to store a count that will only ever be 1 if we didn't return, don't
need to increment pointers to allow storing more than one item when we
can only ever possibly do one.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|
|
|
|
|
|
|
|
|
| |
Code seems to have been originally written to handle appending multiple
strings, but only ever operates on a single string.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
|