Skip to content
Snippets Groups Projects
  1. May 18, 2018
    • Peter Maydell's avatar
      sdl: Move use of surface pointer below check for whether it is NULL · e8dcb8ae
      Peter Maydell authored
      
      In commit 2ab858c6 we added a use of the 'surf' variable
      in sdl2_2d_update() that was unfortunately placed above the
      early-exit-if-NULL check. Move it to where it ought to be.
      
      Fixes: Coverity CID 1390598
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-id: 20180515185814.1374-1-peter.maydell@linaro.org
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      e8dcb8ae
    • Paolo Bonzini's avatar
      ui: add x_keymap.o to modules · 68898bc8
      Paolo Bonzini authored
      
      x_keymap.o is common to the SDL and GTK+ modules, and it causes the
      QEMU binary to link to the X11 libraries.  Add it separately to the
      modules to keep the main QEMU binary smaller.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Message-id: 1526560782-18732-1-git-send-email-pbonzini@redhat.com
      
      [ kraxel: fix lm32 target build (milkymist-tmu2) ]
      
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      68898bc8
    • Michal Privoznik's avatar
      console: Avoid segfault in screendump · 08d9864f
      Michal Privoznik authored
      
      After f771c544 it is possible to select device and
      head which to take screendump from. And even though we check if
      provided head number falls within range, it may still happen that
      the console has no surface yet leading to SIGSEGV:
      
        qemu.git $ ./x86_64-softmmu/qemu-system-x86_64 \
          -qmp stdio \
          -device virtio-vga,id=video0,max_outputs=4
      
        {"execute":"qmp_capabilities"}
        {"execute":"screendump", "arguments":{"filename":"/tmp/screen.ppm", "device":"video0", "head":1}}
        Segmentation fault
      
       #0  0x00005628249dda88 in ppm_save (filename=0x56282826cbc0 "/tmp/screen.ppm", ds=0x0, errp=0x7fff52a6fae0) at ui/console.c:304
       #1  0x00005628249ddd9b in qmp_screendump (filename=0x56282826cbc0 "/tmp/screen.ppm", has_device=true, device=0x5628276902d0 "video0", has_head=true, head=1, errp=0x7fff52a6fae0) at ui/console.c:375
       #2  0x00005628247740df in qmp_marshal_screendump (args=0x562828265e00, ret=0x7fff52a6fb68, errp=0x7fff52a6fb60) at qapi/qapi-commands-ui.c:110
      
      Here, @ds from frame #0 (or @surface from frame #1) is
      dereferenced at the very beginning of ppm_save(). And because
      it's NULL crash happens.
      
      Signed-off-by: default avatarMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: default avatarThomas Huth <thuth@redhat.com>
      Message-id: cb05bb1909daa6ba62145c0194aafa05a14ed3d1.1526569138.git.mprivozn@redhat.com
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      08d9864f
  2. May 15, 2018
  3. May 11, 2018
  4. Apr 27, 2018
  5. Apr 10, 2018
    • Gerd Hoffmann's avatar
      gtk: drop pointless code from gd_window_close · fa2d039b
      Gerd Hoffmann authored
      
      Unregistering the display change listener looks like a pointless
      excercise given we'll exit in a moment.  When exiting qemu via
      menu/file/quit this will not happen either.  Just drop the code.
      
      Also return TRUE unconditionally.  This will tell gtk to ignore the
      close request, so gtk will not start destroying widgets and causing
      warnings due to UI code trying to talk to widgets which are gone.
      Just depend on qmp_quit() doing it's job instead.
      
      Reported-by: default avatarMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Message-Id: <20180314080439.4229-1-kraxel@redhat.com>
      fa2d039b
    • Daniel P. Berrangé's avatar
      ui: fix keymap detection under Xwayland · 1e70de67
      Daniel P. Berrangé authored
      
      The X11 code currently detects the keymap by looking for the keycode
      name property. Unfortunately due to the way Xwayland handles keyboards,
      this property gets unset almost immediately after the first application
      starts using Xwayland resulting in
      
        ** (qemu-system-x86_64:19644): WARNING **: Unknown X11 keycode mapping '(unnamed)'.
        Please report to qemu-devel@nongnu.org
        including the following information:
      
          - Operating system
          - X11 Server
          - xprop -root
          - xdpyinfo
      
      Fortunately people will only see this problem if they built QEMU with
      GTK2, or have told GTK3 to prefer X11 by setting the GDK_BACKEND=x11
      env variable.
      
      To workaround the problem, we add a heuristic that looks at what
      scancode the XK_Page_Up keysymbol maps to, to determine if we've
      likely got the X11 kbd or evdev driver.
      
      Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
      Message-Id: <20180313104235.20725-1-berrange@redhat.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      1e70de67
  6. Apr 09, 2018
  7. Apr 04, 2018
  8. Mar 13, 2018
  9. Mar 12, 2018
  10. Mar 06, 2018
  11. Mar 05, 2018
Loading