qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH] qemu-keymap: properly check return from xkb_keymap_mod_g


From: Peter Maydell
Subject: Re: [RFC PATCH] qemu-keymap: properly check return from xkb_keymap_mod_get_index
Date: Tue, 20 Jun 2023 17:10:29 +0100

On Tue, 20 Jun 2023 at 16:55, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> On 6/20/23 17:37, Alex Bennée wrote:
> > ar maybe? it only got flagged in clang-system once fedora was updated (I
> > assume with better sanitizers):
> >
> >    [2773/3696] Generating pc-bios/keymaps/ar with a custom command
> >    FAILED: pc-bios/keymaps/ar
> >    /builds/stsquad/qemu/build/qemu-keymap -f pc-bios/keymaps/ar -l ar
> >    ../qemu-keymap.c:223:16: runtime error: shift exponent 4294967295 is too 
> > large for 32-bit type 'int'
> >    SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
> > ../qemu-keymap.c:223:16 in
> >    [2774/3696] Generating pc-bios/edk2-x86_64-code.fd with a custom command 
> > (wrapped by meson to capture output)
> >    [2775/3696] Generating pc-bios/edk2-x86_64-secure-code.fd with a custom 
> > command (wrapped by meson to capture output)
> >    ninja: build stopped: subcommand failed.
> >    make: *** [Makefile:153: run-ninja] Error 1
> >
> > https://gitlab.com/stsquad/qemu/-/jobs/4500683186#L3957
>
> Related:
>
> https://gitlab.com/qemu-project/qemu/-/issues/1709
> https://gitlab.com/qemu-project/qemu/-/issues/1712
>
> which note that keymaps/ar has changed to keymaps/ara in xkeyboard-config 
> from 2.38 to 2.39.

On Ubuntu I have xkb-data 2.33.1, but that already has
/usr/share/X11/xkb/symbols/ara, not ar.   Asking qemu-keymap
for either 'ar' or 'ara' works. So this is not so much
that the filename has changed in 2.39, but merely that
xkb has stopped accepting a legacy compatibility synonym.
The upstream change is:
https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/470ad2cd8fea84d7210377161d86b31999bb5ea6

So the easy fix I think is to change the line in
pc-bios/keymaps/meson.build from
  'ar': '-l ar',
to
  'ar': '-l ara',

As the commit message notes, 'ara' has been the standard
xkb name upstream for over 15 years, so this won't break
our build on older versions of the xkb data.

(In theory we could also rename the pcbios keymap name,
but that seems like unnecessary effort.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]