- Feb 02, 2025
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Jan 11, 2025
-
-
Alan Coopersmith authored
syncs with changes to libxcb 1.16 & 1.16.1 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!277>
-
- Jan 10, 2025
-
-
Aaron Muir Hamilton authored
Part-of: <!270>
-
- Dec 30, 2024
-
-
Alan Coopersmith authored
It was made a static function in May 14, 1991 by rws in commit "make FirstCmp static" for X11R5 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!276>
-
- Dec 14, 2024
-
-
Wismill authored
There are two issues with the use of `UCSConvertCase` in `XConvertCase`: - Some Latin-1 keysyms do not map within Latin-1, e.g. `ssharp`. Only Latin-1 keysyms have the same value as the Unicode code point of their corresponding character. So `UCSConvertCase` does not work for some Latin-1 keysyms as it returns Unicode code points outside Latin-1 that do not match their corresponding keysyms values. - Some Unicode keysyms should map to Latin-1 keysyms (<0x100). But the Unicode keysym mask 0x01000000 is applied blindly to the result of `UCSConvertCase`, resulting in invalid Unicode keysyms (0x010000nn) while they should be Latin-1 keysyms. Example with ß/ẞ: ```c KeySym lower, upper; XConvertCase(XK_ssharp, &lower, &upper); // Expected: lower == XK_ssharp, upper == U1E9E // Got: lower == XK_ssharp, upper == 0x1E9E XConvertCase(U1E9E, &lower, &upper); // Expected: lower == XK_ssharp, upper == U1E9E // Got: lower == 0x10000df, upper == U1E9E ``` Part-of: <!274>
-
- Nov 16, 2024
-
-
Closes: #225 Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!273>
-
- Nov 11, 2024
-
-
Alan Coopersmith authored
Clears 8 warnings from clang of the form: imDefIc.c:366:29: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] XIM_SET_PAD(&buf_s[2], len); /* pad */ ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 2 clang warnings: Xrm.c:1186:51: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] while (is_space(bits = next_char(c, str))) {}; ^ Xrm.c:1191:48: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] while (is_space(bits = next_char(c, str))) {}; ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
- Nov 10, 2024
-
-
Alan Coopersmith authored
Clears 2 clang warnings: XlibInt.c:672:26: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] DL_APPEND(*head, add); ^ XlibInt.c:694:36: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] DL_DELETE(*head, event); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 10 warnings from clang of the form: xcb_io.c:177:56: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] xcb_xlib_unknown_req_in_deq); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 24 warnings from clang of the form: TextExt16.c:63:34: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] CI_GET_DEFAULT_INFO_1D (fs, def); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 5 warnings from clang of the form: RdBitF.c:141:32: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] RETURN (BitmapFileInvalid); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 3 warnings from clang of the form: PolyReg.c:224:67: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 4 warnings from clang of the form: ParseCmd.c:158:43: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] PutCommandResource(options[i].value); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 4 warnings from clang of the form: CrGlCur.c:140:64: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] GetFunc (TryShapeCursorFunc, "XcursorTryShapeCursor", func); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Makes them match the style of the other macros here and clears up 5 clang warnings of the form: Context.c:194:27: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] _XCreateMutex(&db->linfo); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 13 warnings from clang of the form: Backgnd.c:44:72: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] OneDataCard32 (dpy, NEXTPTR(req,xChangeWindowAttributesReq), pixel); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 6 warnings from clang of the form: XKBBind.c:74:48: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] _XkbCheckPendingRefresh(dpy, dpy->xkb_info); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 46 warnings from clang of the form: XKB.c:207:69: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] BufAlloc(char *, out, (((size * 2) + (unsigned) 3) / 4) * 4); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 4 warnings from clang of the form: lcUtil.c:53:18: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] set_toupper(ch1); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 38 warnings from clang of the form: cmsLkCol.c:155:35: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] Data (dpy, colorname, (long)n); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
Alan Coopersmith authored
Clears 12 warnings from clang of the form: cmsCmap.c:194:34: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt] DeqAsyncHandler(dpy, &async); ^ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!272>
-
- Nov 04, 2024
- Oct 26, 2024
-
-
Alan Coopersmith authored
Found by Oracle Parfait 13.3 static analyzer: X Resource Leak [X-resource-leak]: Leaked X Resource window at line 306 of imDefIm.c in function '_XimPreConnectionIM'. window initialized at line 300 with XCreateSimpleWindow Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!269>
-
- Oct 12, 2024
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!268>
-
- Sep 29, 2024
-
-
Alan Coopersmith authored
Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined: imCallbk.c:346:9: error: ‘memcpy’ offset 10 is out of the bounds [0, 1] [-Werror=array-bounds=] 346 | memcpy(&buf[p],&cbrec.text->string.mbs,length_in_bytes); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!267>
-
Alan Coopersmith authored
Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined: imDefIm.c: In function ‘_XimEncodingNegotiation’: imDefIm.c:1739:15: error: ‘memcpy’ offset 8 is out of the bounds [0, 1] [-Werror=array-bounds=] 1739 | (void)memcpy((char *)&buf_s[2], name_ptr, name_len); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!267>
-
Alan Coopersmith authored
Avoids build failures with gcc 14.2 when MALLOC_0_RETURNS_NULL is defined: lcWrap.c: In function ‘_XlcDefaultMapModifiers’: lcWrap.c:149:9: warning: ‘strcpy’ writing between 4294967296 and 9223372036854775806 bytes into a region of size 1 [-Wstringop-overflow=] 149 | strcpy(mods, prog_mods); | ^~~~~~~~~~~~~~~~~~~~~~~ ../../include/X11/Xlibint.h:457:24: note: destination object of size 1 allocated by ‘malloc’ 457 | # define Xmalloc(size) malloc((size_t)((size) == 0 ? 1 : (size))) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lcWrap.c:147:12: note: in expansion of macro ‘Xmalloc’ 147 | mods = Xmalloc(i); | ^~~~~~~ lcWrap.c:149:9: error: ‘__builtin_memcpy’ forming offset [1, 4294967295] is out of the bounds [0, 1] [-Werror=array-bounds=] 149 | strcpy(mods, prog_mods); | ^~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!267>
-
- Aug 31, 2024
-
-
Alan Coopersmith authored
Clears warning from gcc 14.1: SetFPath.c: In function ‘XSetFontPath’: ../include/X11/Xlibint.h:463:24: warning: argument 1 value is zero [-Walloc-zero] 463 | # define Xmalloc(size) malloc((size_t)(size)) | ^~~~~~~~~~~~~~~~~~~~~~ SetFPath.c:61:18: note: in expansion of macro ‘Xmalloc’ 61 | if ((p = Xmalloc (nbytes))) { | ^~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <!266>
-
- Aug 09, 2024
-
-
Olivier Fourdan authored
Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Part-of: <!264>
-
Olivier Fourdan authored
Commit 1472048b to fix a colormap threading issue added a display lock/unlock and a call to SyncHandle() to _XcmsFreeClientCmaps(). When running synchronized, that means calling XSync(). _XcmsFreeClientCmaps() is called from _XFreeDisplayStructure() via XCloseDisplay() after the xcb connection is closed. So when running synchronized, we may end up calling XSync() after the xcb connection to the display is closed, which will generate a spurious XIO error: | #0 in _XDefaultIOError () at /lib64/libX11.so.6 | #1 in _XIOError () at /lib64/libX11.so.6 | #2 in _XReply () at /lib64/libX11.so.6 | #3 in XSync () at /lib64/libX11.so.6 | #4 in _XSyncFunction () at /lib64/libX11.so.6 | 8#5 in _XFreeDisplayStructure () at /lib64/libX11.so.6 | 8#6 in XCloseDisplay () at /lib64/libX11.so.6 To avoid that issue, closed the xcb connection to the display last. v2: And same in OutOfMemory() as well (José Expósito) Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Reviewed-by:
José Expósito <jexposit@redhat.com> Part-of: <!264>
-
- Jul 28, 2024
-
-
Alan Coopersmith authored
Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com>
-
- Jul 23, 2024
-
-
Kelly Roadkill authored
Testing by multilingual typists revealed that the proposed sequences are too complex for everyday use. It seems that the inherent problems with JCUKEN can only be fixed with better kbd layouts. This reverts commit 174df0b8. Part-of: <!261>
-
- Jul 20, 2024
-
-
Part-of: <!259>
-
- Jul 13, 2024
-
-
Alan Coopersmith authored
Fixes gcc warnings: lcFile.c: In function ‘_XlcLocaleLibDirName’: lcFile.c:708:5: warning: use of possibly-NULL ‘last_dir_name’ where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument] 708 | strcpy (last_dir_name, dir_name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by:
Alan Coopersmith <alan.coopersmith@oracle.com> Part-of: <xorg/lib/libx11!258>
-
- Jul 06, 2024
-
-
Alan Coopersmith authored
This reverts commit 4ce3962b. Requested by NetBSD which still has a supported VAX port. Part-of: <xorg/lib/libx11!257>
-
- Jun 24, 2024
-
-
Olivier Fourdan authored
Xlib is now built with threading support enabled from the constructor by default. XRebindKeysym() acquires the display lock, then calls: | XRebindKeysym() | LockDisplay() | ComputeMaskFromKeytrans() | -> XkbKeysymToModifiers() | -> _XkbLoadDpy() | -> XkbGetMap() | -> XkbGetUpdatedMap() | LockDisplay() And the dead lock: | Xlib ERROR: XKBGetMap.c line 575 thread 1fc6e580: locking display already | locked at KeyBind.c line 937 To avoid the issue, call ComputeMaskFromKeytrans() from outside the display lock. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> Closes: xorg/lib/libx11#216 Part-of: <xorg/lib/libx11!256>
-
- Jun 18, 2024
-
-
Kelly Roadkill authored
The only sequence with post-fixed cedilla in the whole en_US.UTF-8 was introduced in cf040016 with the merge of GTK+ compose sequences 12 years ago. It goes against the established patterns. Part-of: <xorg/lib/libx11!255>
-
- Jun 15, 2024
-
-
Protect access to the dpy structure by a display lock, so that these can be called outside of a global display lock. That allows the XCMS colormap functions to be thread safe without having the whole functions within a display lock, to avoid deadlocks. Signed-off-by:
Olivier Fourdan <ofourdan@redhat.com> See-also: xorg/lib/libx11#215 See-also: xorg/lib/libx11#94 Reviewed-by:
Adam Jackson <ajax@redhat.com> Part-of: <xorg/lib/libx11!254>
-
That commit 99a2cf1a was moving the calls to the _Xcms*CmapRec*() family of functions within a display lock to make the XCMS colormap functions thread safe. Unfortunately, that causes a deadlock in XCopyColormapAndFree(), because _XcmsCopyCmapRecAndFree() calls CmapRecForColormap() which calls XGetVisualInfo() which also tries to acquire the display lock. So, instead of moving the entire functions within the display lock, let's try to make the functions themselves thread safe in the following commit, and revert this change which causes a deadlock. This reverts commit 99a2cf1a. Fixes: #215 See-also: #94 Reviewed-by:
Adam Jackson <ajax@redhat.com> Part-of: <!254>
-