-
Bug
-
Resolution: External
-
P3
-
internal
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
// 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