Bug 22222 - xorg server crashes on drawing line with sertain form and type by libX11
Summary: xorg server crashes on drawing line with sertain form and type by libX11
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: xorg-server (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Valery Inozemtsev
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-09 14:15 MSK by Vladislav Zavjalov
Modified: 2010-11-03 13:38 MSK (History)
1 user (show)

See Also:


Attachments
Program that crashes xorg server. Build with -lX11 (1.39 KB, text/x-csrc)
2009-11-09 14:15 MSK, Vladislav Zavjalov
no flags Details
Xvfb valgrind log (6.91 KB, text/plain)
2009-11-26 19:49 MSK, Dmitry V. Levin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladislav Zavjalov 2009-11-09 14:15:55 MSK
Created attachment 4049 [details]
Program that crashes xorg server. Build with -lX11

There is a short libX11 x-client in attachment that crashes xorg-server. Xdriver does not metter (tested on nv, nvidia, intel, vesa, fbdev drivers, on Altlinux and Gentoo linux).

This program just draws a dashed line with cap_style=CapProjecting and specific form and width.
Comment 1 Valery Inozemtsev 2009-11-09 14:18:32 MSK
еще раз и по русски
Comment 2 Vladislav Zavjalov 2009-11-09 14:23:52 MSK
Легко! :)

В приложении - короткая программа на libX11, которая рушит х-сервер. Программа рисует пунктирную линия с cap_style=CapProjecting специальной толщины и формы.
Воспроизводится на драйверах nv, nvidia, intel, vesa, fbdev. Воспроизводится не только в AltLinux, но и на каком-то Gentoo.

xorg-server-1.6.5-alt1
Comment 3 Vladislav Zavjalov 2009-11-20 21:20:38 MSK
see also https://bugs.freedesktop.org/show_bug.cgi?id=15946
Comment 4 Dmitry V. Levin 2009-11-26 19:49:39 MSK
Created attachment 4089 [details]
Xvfb valgrind log
Comment 5 Vladislav Zavjalov 2009-11-27 23:28:01 MSK
miFillPolyHelper() is called from miLineProjectingCap() with the following parameters:

pixel:           1
spanData:        0
y:               11
overall_height:  6
left count:      2
right count:     2
lefts[0].height: -3
lefts[0].x: 62
lefts[0].stepx: 1
lefts[0].signdx: 1
lefts[0].e: -2
lefts[0].dy: 4
lefts[0].dx: 2
rights[0].height: 6
rights[0].x: 59
rights[0].stepx: 0
rights[0].signdx: -1
rights[0].e: -5
rights[0].dy: 6
rights[0].dx: 4
lefts[1].height: -3
lefts[1].x: 62
lefts[1].stepx: 1
lefts[1].signdx: 1
lefts[1].e: -2
lefts[1].dy: 4
lefts[1].dx: 2
rights[1].height: 6
rights[1].x: 59
rights[1].stepx: 0
rights[1].signdx: -1
rights[1].e: -5
rights[1].dy: 6
rights[1].dx: 4

height = -3 looks strange :)
Comment 6 Vladislav Zavjalov 2009-11-27 23:36:09 MSK
Oops! These values for {lefts,rights}[1] are more correct:

pixel:           1
spanData:        0
y:               11
overall_height:  6
left count:      2
right count:     2
lefts[0].height: -3
lefts[0].x: 62
lefts[0].stepx: 1
lefts[0].signdx: 1
lefts[0].e: -2
lefts[0].dy: 4
lefts[0].dx: 2
rights[0].height: 6
rights[0].x: 59
rights[0].stepx: 0
rights[0].signdx: -1
rights[0].e: -5
rights[0].dy: 6
rights[0].dx: 4
lefts[1].height: 9
lefts[1].x: 55
lefts[1].stepx: 0
lefts[1].signdx: -1
lefts[1].e: -3
lefts[1].dy: 6
lefts[1].dx: 4
rights[1].height: 0
rights[1].x: 48
rights[1].stepx: 1
rights[1].signdx: 1
rights[1].e: -1
rights[1].dy: 4
rights[1].dx: 2
Comment 7 Vladislav Zavjalov 2009-11-28 00:43:56 MSK
miLineProjectingCap runs with
dx:           -6
dy:           -4

There was a similar bug when negative height appeares from dx=0, dy<0.
see: https://bugs.freedesktop.org/show_bug.cgi?id=2690
Comment 8 Vladislav Zavjalov 2009-12-30 14:57:57 MSK
повесил патч в https://bugs.freedesktop.org/show_bug.cgi?id=15946
Comment 9 Vladislav Zavjalov 2010-11-03 13:38:56 MSK
В общем, непонятно, что делать с этой ошибкой. Проблема есть, патч тоже, вроде есть... Ни в апстриме ни тут пока не комментируют :)
Ясно, что libX11 для рисования линий уже никто не использует, но все таки, может, надо исправить?.. Это я как мантейнер и пользователь xfig волнуюсь :))