@vanfanel I think you forgot to mention running hurrican with the -C parameter to really exercise the shaders.
Here's the stack trace:
Program received signal SIGSEGV, Segmentation fault.
__strcasecmp_l_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:172
172 ../sysdeps/x86_64/multiarch/strcmp-sse42.S: No such file or directory.
(gdb) bt
#0 __strcasecmp_l_sse42 () at ../sysdeps/x86_64/multiarch/strcmp-sse42.S:172
#1 0x0000000000405e22 in SetActionField (xkb=xkb@entry=0x4348b0, elem=elem@entry=0x0, field=0x4363b0 "type", array_ndx=0x43c0d0, value=0x43c150,
info_rtrn=info_rtrn@entry=0x7fffffffdad0) at action.c:1438
#2 0x0000000000418fae in HandleSymbolsVar (stmt=stmt@entry=0x43c190, xkb=xkb@entry=0x4348b0, info=info@entry=0x7fffffffd9e0) at symbols.c:1487
#3 0x000000000041a6a9 in HandleSymbolsFile (file=file@entry=0x447850, xkb=xkb@entry=0x4348b0, merge=merge@entry=2, info=info@entry=0x7fffffffd9e0)
at symbols.c:1667
#4 0x000000000041a90d in CompileSymbols (file=0x447850, result=result@entry=0x7fffffffdc50, merge=merge@entry=2) at symbols.c:2224
#5 0x00000000004128f6 in CompileKeymap (file=0x0, file@entry=0x4478a0, result=result@entry=0x7fffffffdc50, merge=merge@entry=3) at keymap.c:157
#6 0x000000000041da2f in main (argc=3, argv=0x7fffffffddb8) at xkbcomp.c:1037
SetActionField is called with a NULL elem parameter and the call to uStrCaseCmp crashes.
Leandro Nini (931c469b) at 10 Dec 16:17
Leandro Nini (931c469b) at 10 Dec 08:36
Avoid possibly dereferencing null pointer
Merge request !17 (merged) opened
Leandro Nini (9d1a5390) at 10 Dec 08:14
Avoid possibly dereferencing null pointer
Leandro Nini (e9c1da23) at 10 Dec 08:10
Avoid possibly dereferencing null pointer
This addresses issue #21
Leandro Nini (27445eb3) at 10 Dec 07:49
Avoid possibly dereferencing null pointer
Leandro Nini (7bac6a25) at 10 Dec 07:48
It might be a false positive triggered by the -ftracer flag but I'm noticing something suspicious in the code: if key is NULL but warningLevel is 0 strncpy will copy over an unallocated structure. Shouldn't the code actually return False in any case when key is NULL? Something like:
if (!key)
{
if (warningLevel > 0)
{
WSGO("Couldn't allocate OverlayKeyInfo\n");
ACTION("Overlay %s for section %s will be incomplete\n",
XkbAtomText(info->dpy, ol.name, XkbMessage),
scText(info->dpy, si));
}
return False;
}
Edit: in fact this change makes the warnings go away.
Changing the lines to
strncpy(key->over, keyDef->over, XkbKeyNameLength+1);
strncpy(key->under, keyDef->under, XkbKeyNameLength+1);
fixes the stringop-truncation warnings but not the array-bounds ones. I think I'll file a gcc bug, both arrays are five char wide so the message seems bogus.
You're right, it's the -ftracer flag that causes the issue. I wonder if this is a gcc bug or feature...
It happens also with gcc version 11.3.0. I've found it can be workaround by passing the --disable-selective-werror option.
Can't compile xkbcomp-1.4.6 due to an array-bounds error:
geometry.c:2580:9: error: ‘strncpy’ offset [0, 3] is out of the bounds [0, 0] [-Werror=array-bounds]
2580 | strncpy(key->over, keyDef->over, XkbKeyNameLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geometry.c:2581:9: error: ‘strncpy’ offset [0, 3] is out of the bounds [0, 0] [-Werror=array-bounds]
2581 | strncpy(key->under, keyDef->under, XkbKeyNameLength);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The command line used is:
./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
--localstatedir=/var --disable-dependency-tracking
make
Also tried adding the --disable-strict-compilation option with the same result.
gcc version 12.2.0 (GCC)
Build log attached