GNOME Bugzilla – Bug 706598
MonitorXrandr: Fix enumerating possible clone displays
Last modified: 2013-08-22 20:11:31 UTC
The enumeration of the possible clones seems incorrect and the loop overwrites the variable multiple times. The following segv was observed: Core was generated by `/usr/bin/gnome-shell --mode=classic'. Program terminated with signal 11, Segmentation fault.
+ Trace 232409
$1 = (MetaOutput *) 0x2d5bc70 (gdb) print meta_output->possible_clones $2 = (MetaOutput **) 0x53
Created attachment 252774 [details] [review] MonitorXrandr: Fix segv when accessing possible_clones This code requires a double pass and the segv happens later when trying to iterate over the array.
Untested patch awaiting feedback, but it looks correct to me anyway.
Locally tested, it fixed the issue
Comment on attachment 252774 [details] [review] MonitorXrandr: Fix segv when accessing possible_clones <ovitters> gcampax: ok to commit https://bug706598.bugzilla-attachments.gnome.org/attachment.cgi?id=252774 ? <gcampax> ovitters, yes <drago01> ouch <gcampax> btw, on what hw did you hit this? <drago01> no idea how I didn't notice that during review <drago01> ovitters: push
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.