Running the command (notice the "-" before "HDMI-0"):
xrandr --output -HDMI-0 --set "underscan" "off"
causes an segfault at ProcRRGetOutputProperty in X server.
Running the right command works without problems (xrandr --output HDMI-0 --set "underscan" "off")
X: current git (1.9)
ddx (r600): current git (6.13)
Program received signal SIGSEGV, Segmentation fault.
0x00000000004c4af4 in ProcRRGetOutputProperty (client=0xef0800) at rrproperty.c:604
604 for (prev = &output->properties; (prop = *prev); prev = &prop->next)
#0 0x00000000004c4af4 in ProcRRGetOutputProperty (client=0xef0800) at rrproperty.c:604
#1 0x000000000042fe01 in Dispatch () at dispatch.c:432
#2 0x0000000000425375 in main (argc=4, argv=<value optimized out>, envp=<value optimized out>) at main.c:291
(gdb) p output
$1 = (RROutputPtr) 0x0
Interesting that VERIFY_RR_OUTPUT() returns Success when the output doesn't exist.
The problem is that RRExtensionInit() (randr/randr.c) is called _after_ RROutputInit() (randr/rroutput.c) which results in RRErrorBase being 0 while setting the error number of the resource type RROutput (BadRROutput (also 0)).
RRErrorBase+BadRROutput = 0+0 = 0 (0 == Success)
This error is returned by dixLookupResourceByType() (dix/resource.c) and _is_ equal to Success (which should not happen).
RRExtensionInit() has to be called _before_ RROutputInit() to get a RRErrorBase>0 and a BadRROutput!=Succes.
Created attachment 39000 [details] [review]
possible patch (set error numbers in RRExtensionInit)
(in xserver master)