Xserver crashes when drawing multi-segment dashed lines that extend outside visible window. Running Linux, Opensuse 13.1 with kernel 3.17. Running on i5-2500K using on-board graphics. X server is version 7.6_1.16.1, Intel driver is version 2.99.916 The crash occurs both on KDE and icewm. After a crash, log file shows the following ---------------- begin log segment -------------- [ 3111.676] (EE) 14: /usr/bin/Xorg (0x400000+0x2cba1) [0x42cba1] [ 3111.676] (EE) [ 3111.676] (EE) Segmentation fault at address 0x7fffdf4a1004 [ 3111.676] (EE) Fatal server error: [ 3111.676] (EE) Caught signal 11 (Segmentation fault). Server aborting [ 3111.676] (EE) [ 3111.676] (EE) Please consult the The X.Org Foundation support at http://wiki.x.org for help. ----------------- end log segment ---------------- The crash can be reproduced by the short program listed below. It does not crash on every draw call, hence the program loop. Usually it crashes in < 100 iterations of the loop. The conditions for crashing are fairly specific; if you make _any_ of the following changes to the test program, it will no longer crash: a) Increase the window size to 600x600 b) Change the line width to 2 or more c) For equal on-off dashes, set the dash length to something which is not 3, 8, 9, 10, 15, 17 or 19 (These are the only dash lengths <= 20 which cause the crash). d) Change the join to JoinMiter ---------------------- Test program ----------------- /* compile with gcc -O2 -Wall -o x5 x5.c -L /usr/X11R6/lib -lX11 -lm */ #include #include #include #include XPoint pts[] = { {229, 229}, {223, 234}, {217, 240}, {211, 246}, {205, 252}, {200, 258}, {195, 264}, {189, 270}, {184, 276}, {179, 282}, {174, 288}, {169, 294}, {164, 300}, {160, 306}, {155, 312}, {151, 318}, {146, 324}, {142, 330}, {138, 336}, {134, 341}, {130, 347}, {126, 353}, {123, 358}, {119, 364}, {116, 370}, {113, 375}, {109, 381}, {106, 386}, {104, 391}, {101, 397}, { 98, 402}, { 96, 407}, { 93, 412}, { 91, 417}, { 89, 422}, { 87, 427}, { 86, 432}, { 84, 436}, { 82, 441}, { 81, 445}, { 80, 450}, { 79, 454}, { 78, 458}, { 77, 462}, { 77, 466}, { 76, 470}, { 76, 474}, { 76, 478}, { 76, 481}, { 76, 485}, { 77, 488}, { 77, 491}, { 78, 494}, { 79, 497}, { 80, 500}, { 81, 502}, { 82, 505}, { 84, 507}, { 86, 509}, { 88, 512} }; Display *d; int s; GC gc; int main() { int i; Window w; XEvent e; unsigned int width = 1; char dash[] = {3,3}; int join = JoinBevel; int CYCLES = 50000; d=XOpenDisplay(NULL); if(d==NULL) { printf("Cannot open display\n"); exit(1); } s=DefaultScreen(d); gc = XDefaultGC(d, s); XSetLineAttributes(d, gc, width, LineOnOffDash, CapButt, join); w=XCreateSimpleWindow(d, RootWindow(d, s), 100, 100, 400, 400, 1, BlackPixel(d, s), WhitePixel(d, s)); XSelectInput(d, w, ExposureMask | KeyPressMask); XMapWindow(d, w); while(1) { XNextEvent(d, &e); if(e.type==Expose) { printf("Running\n"); XSetDashes(d, gc, 0, dash, sizeof(dash)); for (i=0; i