Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8280985

[XWayland] test/jdk/java/awt/Frame/HugeFrame/HugeFrame.java crash

XMLWordPrintable

      test/jdk/java/awt/Frame/HugeFrame/HugeFrame.java crash can be easily reproduced using only X11 code:

      // gcc hugeFrame.c -o hugeFrame -lX11 && ./hugeFrame
      #include <X11/Xlib.h>
      #include <unistd.h>

      static Display* display;

      int main(void) {
          int width = 22000;
          int height = 25000;

          display = XOpenDisplay(NULL);

          Window win = XCreateSimpleWindow(display, DefaultRootWindow(display), 0, 0, width, height, 0, 0L, 0L);
          XMapWindow(display, win);
          XFlush(display);

          sleep(1);
      }

      It crashes the whole gnome-shell system, there is no working GUI interface after that crash.

      /var/log/syslog shows something like:

      gnome-shell[1248]: WL: error in client communication (pid 1248)
      gnome-shell[1298]: (EE)
      gnome-shell[1298]: Fatal server error:
      gnome-shell[1298]: (EE) wl_shm@5: error 1: invalid size (-2094967296)
      gnome-shell[1298]: (EE)

      where -2094967296 looks like an integer overflow of 4 * 22000 * 25000

      Fix released:
      https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/754
      https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/179

            azvegint Alexander Zvegintsev
            azvegint Alexander Zvegintsev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: